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

Unified Diff: chrome/renderer/plugins/chrome_plugin_placeholder.h

Issue 1015023002: Plugin Power Saver: Throttle 'large' plugins that appear small. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: chrome/renderer/plugins/chrome_plugin_placeholder.h
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.h b/chrome/renderer/plugins/chrome_plugin_placeholder.h
index e404994e52cf257b0dc216d65bbca023ffddecfb..9d243483916887154634b6ef6bbe0e65c6a46794 100644
--- a/chrome/renderer/plugins/chrome_plugin_placeholder.h
+++ b/chrome/renderer/plugins/chrome_plugin_placeholder.h
@@ -9,16 +9,27 @@
#include "content/public/renderer/context_menu_client.h"
#include "content/public/renderer/render_process_observer.h"
+namespace gfx {
+class Size;
+}
+
struct ChromeViewHostMsg_GetPluginInfo_Status;
+// If |poster_attribute| contains relative paths, |base_url| must be
Lei Zhang 2015/04/01 19:18:35 If someone reads this for the first time, I don't
tommycli 2015/04/01 19:33:20 Done. You're right. I cleaned up the commenting.
+// non-empty. This is so the placeholder can resolve the relative paths.
+// |custom_poster_size| is ignored if it is an empty gfx::Size.
+struct PlaceholderPosterInfo {
+ std::string poster_attribute;
+ GURL base_url;
+ gfx::Size custom_poster_size;
+};
+
class ChromePluginPlaceholder : public plugins::LoadablePluginPlaceholder,
public content::RenderProcessObserver,
public content::ContextMenuClient {
public:
static const char kPluginPlaceholderDataURL[];
- // If |poster_attribute| contains relative paths, |base_url| must be
- // non-empty. This is so the placeholder can resolve the relative paths.
static ChromePluginPlaceholder* CreateBlockedPlugin(
content::RenderFrame* render_frame,
blink::WebLocalFrame* frame,
@@ -28,8 +39,7 @@ class ChromePluginPlaceholder : public plugins::LoadablePluginPlaceholder,
const base::string16& name,
int resource_id,
const base::string16& message,
- const std::string& poster_attribute,
- const GURL& base_url);
+ const PlaceholderPosterInfo& poster_info);
// Creates a new WebViewPlugin with a MissingPlugin as a delegate.
static ChromePluginPlaceholder* CreateMissingPlugin(

Powered by Google App Engine
This is Rietveld 408576698