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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.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: content/renderer/pepper/pepper_plugin_instance_impl.h
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h
index e322cfb1453ff1d13f5325fa710bab8624903939..12eb6a2f02ad37f30b2ed1ae49eaa0055030b48a 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.h
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.h
@@ -209,8 +209,9 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
bool HandleInputEvent(const blink::WebInputEvent& event,
blink::WebCursorInfo* cursor_info);
PP_Var GetInstanceObject(v8::Isolate* isolate);
- void ViewChanged(const gfx::Rect& position,
+ void ViewChanged(const gfx::Rect& window,
const gfx::Rect& clip,
+ const gfx::Rect& unobscured,
const std::vector<gfx::Rect>& cut_outs_rects);
// Handlers for composition events.
@@ -742,6 +743,8 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
// The last state sent to the plugin. It is only valid after
// |sent_initial_did_change_view_| is set to true.
ppapi::ViewData last_sent_view_data_;
+ // The current unobscured portion of the plugin.
+ gfx::Rect unobscured_rect_;
// Indicates if we've ever sent a didChangeView to the plugin. This ensures we
// always send an initial notification, even if the position and clip are the
« no previous file with comments | « content/public/renderer/plugin_instance_throttler.h ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698