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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 1199963011: Force new surface on BrowserPluginGuest reattach. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test, and add check for null surface id in test. 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
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_plugin/browser_plugin_guest.h
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h
index 438fc1694e1f03694d4955aef3c73eab21e33f81..c7108036c03a053e58965038ddd117e305f86368 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -190,6 +190,12 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
// Returns whether the guest is attached to an embedder.
bool attached() const { return attached_; }
+ // Returns true when an attachment has taken place since the last time the
+ // compositor surface was set.
+ bool has_attached_since_surface_set() const {
+ return has_attached_since_surface_set_;
+ }
+
// Attaches this BrowserPluginGuest to the provided |embedder_web_contents|
// and initializes the guest with the provided |params|. Attaching a guest
// to an embedder implies that this guest's lifetime is no longer managed
@@ -245,6 +251,15 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
WebContentsImpl* web_contents,
BrowserPluginGuestDelegate* delegate);
+ // Protected for testing.
+ void set_has_attached_since_surface_set_for_test(bool has_attached) {
+ has_attached_since_surface_set_ = has_attached;
+ }
+
+ void set_attached_for_test(bool attached) {
+ attached_ = attached;
+ }
+
private:
class EmbedderVisibilityObserver;
@@ -373,6 +388,10 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
// Indicates whether this guest has been attached to a container.
bool attached_;
+ // Used to signal if a browser plugin has been attached since the last time
+ // the compositing surface was set.
+ bool has_attached_since_surface_set_;
+
// An identifier that uniquely identifies a browser plugin within an embedder.
int browser_plugin_instance_id_;
gfx::Rect guest_window_rect_;
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698