| Index: components/plugins/renderer/plugin_placeholder.h
|
| diff --git a/components/plugins/renderer/plugin_placeholder.h b/components/plugins/renderer/plugin_placeholder.h
|
| index 5d9caa10ee4f33876c7a335d439b14107b12be48..e5fff232372473d5137c52c4247625a142a57e15 100644
|
| --- a/components/plugins/renderer/plugin_placeholder.h
|
| +++ b/components/plugins/renderer/plugin_placeholder.h
|
| @@ -8,7 +8,9 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "components/plugins/renderer/webview_plugin.h"
|
| #include "content/public/renderer/render_frame_observer.h"
|
| +#include "gin/handle.h"
|
| #include "gin/wrappable.h"
|
| +#include "third_party/WebKit/public/web/WebKit.h"
|
| #include "third_party/WebKit/public/web/WebPluginParams.h"
|
|
|
| namespace plugins {
|
| @@ -19,36 +21,51 @@ class PluginPlaceholder : public content::RenderFrameObserver,
|
| public:
|
| static gin::WrapperInfo kWrapperInfo;
|
|
|
| - WebViewPlugin* plugin() { return plugin_; }
|
| -
|
| - protected:
|
| // |render_frame| and |frame| are weak pointers. If either one is going away,
|
| // our |plugin_| will be destroyed as well and will notify us.
|
| PluginPlaceholder(content::RenderFrame* render_frame,
|
| blink::WebLocalFrame* frame,
|
| const blink::WebPluginParams& params,
|
| - const std::string& html_data,
|
| - GURL placeholderDataUrl);
|
| + const std::string& html_data);
|
|
|
| ~PluginPlaceholder() override;
|
|
|
| + WebViewPlugin* plugin() { return plugin_; }
|
| +
|
| + protected:
|
| blink::WebLocalFrame* GetFrame();
|
| const blink::WebPluginParams& GetPluginParams() const;
|
|
|
| // WebViewPlugin::Delegate methods:
|
| + void BindWebFrame(blink::WebFrame* frame) override;
|
| void ShowContextMenu(const blink::WebMouseEvent&) override;
|
| void PluginDestroyed() override;
|
| +
|
| v8::Local<v8::Object> GetV8ScriptableObject(
|
| v8::Isolate* isolate) const override;
|
|
|
| + // gin::Wrappable method:
|
| + gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
| + v8::Isolate* isolate) override;
|
| +
|
| + protected:
|
| + // Hide this placeholder.
|
| + void HidePlugin();
|
| + bool hidden() { return hidden_; }
|
| +
|
| private:
|
| // RenderFrameObserver methods:
|
| void OnDestruct() override;
|
|
|
| + // JavaScript callbacks:
|
| + void HideCallback();
|
| +
|
| blink::WebLocalFrame* frame_;
|
| blink::WebPluginParams plugin_params_;
|
| WebViewPlugin* plugin_;
|
|
|
| + bool hidden_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PluginPlaceholder);
|
| };
|
|
|
|
|