Android Chromoting: Remove exit-fullscreen button.
[chromium-blink-merge.git] / components / plugins / renderer / plugin_placeholder.cc
blob46862656967e355bdc47c08e4a8408da04776544
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/plugins/renderer/plugin_placeholder.h"
7 #include "content/public/renderer/render_frame.h"
9 namespace plugins {
11 gin::WrapperInfo PluginPlaceholder::kWrapperInfo = {gin::kEmbedderNativeGin};
13 PluginPlaceholder::PluginPlaceholder(content::RenderFrame* render_frame,
14 blink::WebLocalFrame* frame,
15 const blink::WebPluginParams& params,
16 const std::string& html_data,
17 GURL placeholderDataUrl)
18 : content::RenderFrameObserver(render_frame),
19 frame_(frame),
20 plugin_params_(params),
21 plugin_(WebViewPlugin::Create(this,
22 render_frame->GetWebkitPreferences(),
23 html_data,
24 placeholderDataUrl)) {
25 DCHECK(placeholderDataUrl.is_valid())
26 << "Blink requires the placeholder to have a valid URL.";
29 PluginPlaceholder::~PluginPlaceholder() {}
31 const blink::WebPluginParams& PluginPlaceholder::GetPluginParams() const {
32 return plugin_params_;
35 void PluginPlaceholder::ShowContextMenu(const blink::WebMouseEvent& event) {
36 // Does nothing by default. Will be overridden if a specific browser wants
37 // a context menu.
38 return;
41 void PluginPlaceholder::PluginDestroyed() {
42 plugin_ = NULL;
45 void PluginPlaceholder::OnDestruct() {
46 frame_ = NULL;
49 blink::WebLocalFrame* PluginPlaceholder::GetFrame() { return frame_; }
51 } // namespace plugins