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

Unified Diff: content/browser/web_contents/web_contents_view_aura.h

Issue 54623007: Make code path for bounds changes getting to renderer less brittle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved observer into content/browser/web_contents/aura and added tests Created 7 years, 1 month 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/web_contents/web_contents_view_aura.h
diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h
index bccb677ec2e58646312e1e24e9a892c3ca2b2f44..8aa0a36617997ebb318d1c892f4eb147cb3b5fe6 100644
--- a/content/browser/web_contents/web_contents_view_aura.h
+++ b/content/browser/web_contents/web_contents_view_aura.h
@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/renderer_host/overscroll_controller_delegate.h"
+#include "content/browser/web_contents/aura/native_view_screen_bounds_observer.h"
#include "content/common/content_export.h"
#include "content/port/browser/render_view_host_delegate_view.h"
#include "content/port/browser/web_contents_view_port.h"
@@ -39,7 +40,8 @@ class CONTENT_EXPORT WebContentsViewAura
NON_EXPORTED_BASE(public OverscrollControllerDelegate),
public ui::ImplicitAnimationObserver,
public aura::WindowDelegate,
- public aura::client::DragDropDelegate {
+ public aura::client::DragDropDelegate,
+ public NativeViewScreenBoundsObserverDelegate {
public:
WebContentsViewAura(WebContentsImpl* web_contents,
WebContentsViewDelegate* delegate);
@@ -49,7 +51,6 @@ class CONTENT_EXPORT WebContentsViewAura
void SetTouchEditableForTest(TouchEditableImplAura* touch_editable);
private:
- class WindowObserver;
#if defined(OS_WIN)
class ChildWindowObserver;
#endif
@@ -186,13 +187,26 @@ class CONTENT_EXPORT WebContentsViewAura
virtual void OnDragExited() OVERRIDE;
virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
+ // Overriden from NativeViewScreenBoundsObserverDelegate
+ virtual aura::Window* GetDelegateWindow() OVERRIDE;
+ virtual void AddDelegateWindowObserver(aura::WindowObserver* observer)
+ OVERRIDE;
+ virtual void RemoveDelegateWindowObserver(aura::WindowObserver* observer)
+ OVERRIDE;
+ virtual void RemoveRootWindowObserver(aura::RootWindowObserver* observer)
+ OVERRIDE;
+ virtual void AddRootWindowObserver(aura::RootWindowObserver* observer)
+ OVERRIDE;
+ virtual void OnScreenPositionChanged() OVERRIDE;
+ virtual void OnScreenBoundsChanged() OVERRIDE;
+
scoped_ptr<aura::Window> window_;
// The window that shows the screenshot of the history page during an
// overscroll navigation gesture.
scoped_ptr<aura::Window> overscroll_window_;
- scoped_ptr<WindowObserver> window_observer_;
+ scoped_ptr<NativeViewScreenBoundsObserver> bounds_observer_;
#if defined(OS_WIN)
scoped_ptr<ChildWindowObserver> child_window_observer_;
#endif

Powered by Google App Engine
This is Rietveld 408576698