Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Unified Diff: components/plugins/renderer/loadable_plugin_placeholder.h

Issue 1126073003: Plugin Placeholders: Refactor for platforms that don't support plugins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: The version that was reverted. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/plugins/renderer/BUILD.gn ('k') | components/plugins/renderer/loadable_plugin_placeholder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5ebb98f14ec13ac414c6eb77172571e4ac3e1ece 100644
--- a/components/plugins/renderer/loadable_plugin_placeholder.h
+++ b/components/plugins/renderer/loadable_plugin_placeholder.h
@@ -9,6 +9,7 @@
#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
@@ -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,15 +63,9 @@ 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;
@@ -125,7 +115,6 @@ class LoadablePluginPlaceholder : public PluginPlaceholder {
bool allow_loading_;
- bool hidden_;
bool finished_loading_;
std::string identifier_;
« no previous file with comments | « components/plugins/renderer/BUILD.gn ('k') | components/plugins/renderer/loadable_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698