| Index: components/plugins/renderer/loadable_plugin_placeholder.h
|
| diff --git a/components/plugins/renderer/loadable_plugin_placeholder.h b/components/plugins/renderer/loadable_plugin_placeholder.h
|
| index 7683ba7c6d8a081c1c7116859c449a061552a52c..6a1039d29694eafd12caa6f72e6333cceec00d3d 100644
|
| --- a/components/plugins/renderer/loadable_plugin_placeholder.h
|
| +++ b/components/plugins/renderer/loadable_plugin_placeholder.h
|
| @@ -9,11 +9,12 @@
|
| #include "components/plugins/renderer/plugin_placeholder.h"
|
| #include "content/public/common/webplugininfo.h"
|
| #include "content/public/renderer/plugin_instance_throttler.h"
|
| +#include "content/public/renderer/render_thread.h"
|
|
|
| namespace plugins {
|
| // Placeholders can be used if a plugin is missing or not available
|
| // (blocked or disabled).
|
| -class LoadablePluginPlaceholder : public PluginPlaceholder {
|
| +class LoadablePluginPlaceholder : public PluginPlaceholderBase {
|
| public:
|
| void set_blocked_for_background_tab(bool blocked_for_background_tab) {
|
| is_blocked_for_background_tab_ = blocked_for_background_tab;
|
| @@ -23,7 +24,6 @@ class LoadablePluginPlaceholder : public PluginPlaceholder {
|
| is_blocked_for_prerendering_ = blocked_for_prerendering;
|
| }
|
|
|
| -#if defined(ENABLE_PLUGINS)
|
| bool power_saver_enabled() const { return power_saver_enabled_; }
|
|
|
| void set_power_saver_enabled(bool power_saver_enabled) {
|
| @@ -35,23 +35,19 @@ class LoadablePluginPlaceholder : public PluginPlaceholder {
|
|
|
| // When we load the plugin, use this already-created plugin, not a new one.
|
| void SetPremadePlugin(content::PluginInstanceThrottler* throttler);
|
| -#endif
|
|
|
| - void set_allow_loading(bool allow_loading) { allow_loading_ = allow_loading; }
|
| + void DisallowLoading() { allow_loading_ = false; }
|
|
|
| protected:
|
| LoadablePluginPlaceholder(content::RenderFrame* render_frame,
|
| blink::WebLocalFrame* frame,
|
| const blink::WebPluginParams& params,
|
| - const std::string& html_data,
|
| - GURL placeholderDataUrl);
|
| + const std::string& html_data);
|
|
|
| ~LoadablePluginPlaceholder() override;
|
|
|
| -#if defined(ENABLE_PLUGINS)
|
| void MarkPluginEssential(
|
| content::PluginInstanceThrottler::PowerSaverUnthrottleMethod method);
|
| -#endif
|
|
|
| void OnLoadBlockedPlugins(const std::string& identifier);
|
| void OnSetIsPrerendering(bool is_prerendering);
|
| @@ -67,18 +63,12 @@ class LoadablePluginPlaceholder : public PluginPlaceholder {
|
| // a placeholder again).
|
| void ReplacePlugin(blink::WebPlugin* new_plugin);
|
|
|
| - // Hide this placeholder.
|
| - void HidePlugin();
|
| -
|
| // Load the blocked plugin.
|
| void LoadPlugin();
|
|
|
| - // WebViewPlugin::Delegate (via PluginPlaceholder) method
|
| - void BindWebFrame(blink::WebFrame* frame) override;
|
| -
|
| - // gin::Wrappable method:
|
| - gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
| - v8::Isolate* isolate) override;
|
| + // Javascript callbacks:
|
| + void LoadCallback();
|
| + void DidFinishLoadingCallback();
|
|
|
| private:
|
| // WebViewPlugin::Delegate methods:
|
| @@ -89,11 +79,6 @@ class LoadablePluginPlaceholder : public PluginPlaceholder {
|
| // RenderFrameObserver methods:
|
| void WasShown() override;
|
|
|
| - // Javascript callbacks:
|
| - void LoadCallback();
|
| - void HideCallback();
|
| - void DidFinishLoadingCallback();
|
| -
|
| void UpdateMessage();
|
|
|
| bool LoadingBlocked() const;
|
| @@ -125,7 +110,6 @@ class LoadablePluginPlaceholder : public PluginPlaceholder {
|
|
|
| bool allow_loading_;
|
|
|
| - bool hidden_;
|
| bool finished_loading_;
|
| std::string identifier_;
|
|
|
|
|