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

Unified Diff: ui/views/widget/desktop_native_widget_helper_aura.h

Issue 10828133: Desktop Aura: Allow tab drags out of window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 4 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 | « ui/views/views.gyp ('k') | ui/views/widget/desktop_native_widget_helper_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_native_widget_helper_aura.h
diff --git a/ui/views/widget/desktop_native_widget_helper_aura.h b/ui/views/widget/desktop_native_widget_helper_aura.h
index 43e223282e779b53ba66c7de72dd6b9450bde875..e4130de5da071100a44950321ead880f215f8874 100644
--- a/ui/views/widget/desktop_native_widget_helper_aura.h
+++ b/ui/views/widget/desktop_native_widget_helper_aura.h
@@ -6,6 +6,7 @@
#define UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_
#include "ui/aura/root_window_observer.h"
+#include "ui/aura/window_observer.h"
#include "ui/gfx/rect.h"
#include "ui/views/views_export.h"
#include "ui/views/widget/native_widget_helper_aura.h"
@@ -14,6 +15,7 @@
namespace aura {
class RootWindow;
class DesktopCursorClient;
+class DesktopWindowMoveClient;
namespace client {
class ScreenPositionClient;
}
@@ -34,6 +36,7 @@ namespace views {
class NativeWidgetAura;
class WidgetMessageFilter;
#if defined(USE_X11)
+class X11DesktopWindowMoveClient;
class X11WindowEventFilter;
#endif
@@ -41,6 +44,7 @@ class X11WindowEventFilter;
// NativeWidgetAuras to work in a traditional desktop environment.
class VIEWS_EXPORT DesktopNativeWidgetHelperAura
: public NativeWidgetHelperAura,
+ public aura::WindowObserver,
public aura::RootWindowObserver {
public:
explicit DesktopNativeWidgetHelperAura(NativeWidgetAura* widget);
@@ -55,13 +59,16 @@ class VIEWS_EXPORT DesktopNativeWidgetHelperAura
virtual void PreInitialize(aura::Window* window,
const Widget::InitParams& params) OVERRIDE;
virtual void PostInitialize() OVERRIDE;
- virtual void ShowRootWindow() OVERRIDE;
virtual aura::RootWindow* GetRootWindow() OVERRIDE;
virtual gfx::Rect ModifyAndSetBounds(const gfx::Rect& bounds) OVERRIDE;
// Overridden from aura::RootWindowObserver:
virtual void OnRootWindowResized(const aura::RootWindow* root,
const gfx::Size& old_size) OVERRIDE;
+ virtual void OnRootWindowMoved(const aura::RootWindow* root,
+ const gfx::Point& new_origin) OVERRIDE;
+ virtual void OnWindowVisibilityChanged(aura::Window* window,
+ bool visible) OVERRIDE;
virtual void OnRootWindowHostCloseRequested(
const aura::RootWindow* root) OVERRIDE;
@@ -69,6 +76,10 @@ class VIEWS_EXPORT DesktopNativeWidgetHelperAura
// A weak pointer back to our owning widget.
NativeWidgetAura* widget_;
+ // The window from the NativeWidgetAura. We observe events on it, and proxy
+ // visibility stuff to it.
+ aura::Window* window_;
+
// Optionally, a RootWindow that we attach ourselves to.
scoped_ptr<aura::RootWindow> root_window_;
@@ -94,10 +105,13 @@ class VIEWS_EXPORT DesktopNativeWidgetHelperAura
// A simple cursor client which just forwards events to the RootWindow.
scoped_ptr<aura::DesktopCursorClient> cursor_client_;
+ // Handles spinning up the nested run loop for tab dragging.
+
#if defined(OS_WIN)
scoped_ptr<ui::HWNDMessageFilter> hwnd_message_filter_;
#elif defined(USE_X11)
scoped_ptr<X11WindowEventFilter> x11_window_event_filter_;
+ scoped_ptr<X11DesktopWindowMoveClient> x11_window_move_client_;
#endif
DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetHelperAura);
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/desktop_native_widget_helper_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698