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

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

Issue 2164753003: WebViewPlugin: Post geometry-update actions to a task to run async. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 5 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 | « no previous file | components/plugins/renderer/webview_plugin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/plugins/renderer/webview_plugin.h
diff --git a/components/plugins/renderer/webview_plugin.h b/components/plugins/renderer/webview_plugin.h
index 3b5d504985691c2f8d86e94df0ce6fef2699e7a1..c4625e9f11ddd25322db75ba2ea64f644975dcb9 100644
--- a/components/plugins/renderer/webview_plugin.h
+++ b/components/plugins/renderer/webview_plugin.h
@@ -8,6 +8,7 @@
#include <list>
#include <memory>
+#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner_helpers.h"
#include "content/public/renderer/render_view_observer.h"
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
@@ -154,6 +155,9 @@ class WebViewPlugin : public blink::WebPlugin,
void OnDestruct() override;
void OnZoomLevelChanged() override;
+ void UpdatePluginForNewGeometry(const blink::WebRect& window_rect,
+ const blink::WebRect& unobscured_rect);
+
// Manages its own lifetime.
Delegate* delegate_;
@@ -180,6 +184,9 @@ class WebViewPlugin : public blink::WebPlugin,
bool focused_;
bool is_painting_;
bool is_resizing_;
+
+ // Should be invalidated when destroy() is called.
+ base::WeakPtrFactory<WebViewPlugin> weak_factory_;
};
#endif // COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_
« no previous file with comments | « no previous file | components/plugins/renderer/webview_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698