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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 1062273002: Snap RWHVA and resize the legacy window on Windows whenever the ancestor window's bounds change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content_browsertests redness and a crasher while removing observers Created 5 years, 8 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/browser/renderer_host/render_widget_host_view_aura.h
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 89bead7ba5d890cf2c78985745ee68f3cef02191..add0e30d1c4cd0ca2b7825ee3479f212ade40876 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -398,9 +398,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
FRIEND_TEST_ALL_PREFIXES(WebContentsViewAuraTest,
WebContentsViewReparent);
- class WindowObserver;
- friend class WindowObserver;
-
void UpdateCursorIfOverSelf();
// Tracks whether SnapToPhysicalPixelBoundary() has been called.
@@ -500,6 +497,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
bool mouse_locked,
bool selection_popup);
+ // Called when the parent window bounds change.
+ void HandleParentBoundsChanged();
+
// The model object.
RenderWidgetHostImpl* host_;
@@ -507,8 +507,17 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
scoped_ptr<DelegatedFrameHost> delegated_frame_host_;
+ class WindowObserver;
sky 2015/04/09 23:44:38 nit: I believe we try and group class and friend d
ananta 2015/04/10 00:36:52 Moved back to where it was before. I thought it wo
+ friend class WindowObserver;
+
+ class WindowAncestorObserver;
+ friend class WindowAncestorObserver;
+
scoped_ptr<WindowObserver> window_observer_;
+ // Tracks the ancestors of the RWHVA window for bounds changed notifications.
sky 2015/04/09 23:44:38 nit: it isn't bounds change, rather screen bounds
ananta 2015/04/10 00:36:52 Reworded.
+ scoped_ptr<WindowAncestorObserver> ancestor_window_observer_;
+
// Are we in the process of closing? Tracked so fullscreen views can avoid
// sending a second shutdown request to the host when they lose the focus
// after requesting shutdown for another reason (e.g. Escape key).

Powered by Google App Engine
This is Rietveld 408576698