OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_WINDOW_MOVE_CLIENT_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_WINDOW_MOVE_CLIENT_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_WINDOW_MOVE_CLIENT_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_WINDOW_MOVE_CLIENT_H_ |
7 | 7 |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 | 9 |
10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
11 #undef RootWindow | 11 #undef RootWindow |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "ui/aura/client/window_move_client.h" | 16 #include "ui/aura/client/window_move_client.h" |
17 #include "ui/views/views_export.h" | 17 #include "ui/views/views_export.h" |
18 #include "ui/gfx/point.h" | 18 #include "ui/gfx/point.h" |
19 | 19 |
20 namespace aura { | 20 namespace aura { |
21 class RootWindow; | 21 class RootWindow; |
22 } | 22 } |
23 | 23 |
24 namespace views { | 24 namespace views { |
25 | 25 |
26 // When we're dragging tabs, we need to manually position our window. | 26 // When we're dragging tabs, we need to manually position our window. |
27 class VIEWS_EXPORT X11DesktopWindowMoveClient | 27 class VIEWS_EXPORT X11DesktopWindowMoveClient : |
28 : public MessageLoop::Dispatcher, | 28 public base::MessageLoop::Dispatcher, |
29 public aura::client::WindowMoveClient { | 29 public aura::client::WindowMoveClient { |
30 public: | 30 public: |
31 X11DesktopWindowMoveClient(); | 31 X11DesktopWindowMoveClient(); |
32 virtual ~X11DesktopWindowMoveClient(); | 32 virtual ~X11DesktopWindowMoveClient(); |
33 | 33 |
34 // Overridden from MessageLoop::Dispatcher: | 34 // Overridden from MessageLoop::Dispatcher: |
35 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; | 35 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; |
36 | 36 |
37 // Overridden from aura::client::WindowMoveClient: | 37 // Overridden from aura::client::WindowMoveClient: |
38 virtual aura::client::WindowMoveResult RunMoveLoop( | 38 virtual aura::client::WindowMoveResult RunMoveLoop( |
39 aura::Window* window, | 39 aura::Window* window, |
(...skipping 18 matching lines...) Expand all Loading... |
58 // started. Used to calculate the window's new bounds relative to the current | 58 // started. Used to calculate the window's new bounds relative to the current |
59 // location of the cursor. | 59 // location of the cursor. |
60 gfx::Vector2d window_offset_; | 60 gfx::Vector2d window_offset_; |
61 | 61 |
62 base::Closure quit_closure_; | 62 base::Closure quit_closure_; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace views | 65 } // namespace views |
66 | 66 |
67 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_WINDOW_MOVE_CLIENT_H_ | 67 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_WINDOW_MOVE_CLIENT_H_ |
OLD | NEW |