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

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

Issue 1124173008: Plugin Power Saver: Unthrottle dynamically sized plugins correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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: components/plugins/renderer/webview_plugin.h
diff --git a/components/plugins/renderer/webview_plugin.h b/components/plugins/renderer/webview_plugin.h
index 08f5296c790809a8570551d058d0ab9bf5ef3d40..3286fae6a2bbe0f285b59ebd18877194518c32fb 100644
--- a/components/plugins/renderer/webview_plugin.h
+++ b/components/plugins/renderer/webview_plugin.h
@@ -25,6 +25,10 @@ class RenderView;
struct WebPreferences;
}
+namespace gfx {
+class Size;
+}
+
// This class implements the WebPlugin interface by forwarding drawing and
// handling input events to a WebView.
// It can be used as a placeholder for an actual plugin, using HTML for the UI.
@@ -52,6 +56,9 @@ class WebViewPlugin : public blink::WebPlugin,
// Called to enable JavaScript pass-through to a throttled plugin, which is
// loaded but idle. Doesn't work for blocked plugins, which is not loaded.
virtual v8::Local<v8::Object> GetV8ScriptableObject(v8::Isolate*) const = 0;
+
+ // Called when the unobscured size of the plugin is updated.
+ virtual void OnUnobscuredSizeUpdate(const gfx::Size& unobscured_size) {}
};
// Convenience method to set up a new WebViewPlugin using |preferences|
« no previous file with comments | « components/plugins/renderer/loadable_plugin_placeholder.cc ('k') | components/plugins/renderer/webview_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698