| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_WHOLE_SCREEN_MOVE_LOOP_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // Runs a nested message loop and grabs the mouse. This is used to implement | 33 // Runs a nested message loop and grabs the mouse. This is used to implement |
| 34 // dragging. | 34 // dragging. |
| 35 class X11WholeScreenMoveLoop : public X11MoveLoop, | 35 class X11WholeScreenMoveLoop : public X11MoveLoop, |
| 36 public ui::PlatformEventDispatcher { | 36 public ui::PlatformEventDispatcher { |
| 37 public: | 37 public: |
| 38 explicit X11WholeScreenMoveLoop(X11MoveLoopDelegate* delegate); | 38 explicit X11WholeScreenMoveLoop(X11MoveLoopDelegate* delegate); |
| 39 virtual ~X11WholeScreenMoveLoop(); | 39 virtual ~X11WholeScreenMoveLoop(); |
| 40 | 40 |
| 41 // ui:::PlatformEventDispatcher: | 41 // ui:::PlatformEventDispatcher: |
| 42 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override; | 42 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override; |
| 43 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override; | 43 virtual ui::PostDispatchAction DispatchEvent( |
| 44 const ui::PlatformEvent& event) override; |
| 44 | 45 |
| 45 // X11MoveLoop: | 46 // X11MoveLoop: |
| 46 virtual bool RunMoveLoop(aura::Window* window, | 47 virtual bool RunMoveLoop(aura::Window* window, |
| 47 gfx::NativeCursor cursor) override; | 48 gfx::NativeCursor cursor) override; |
| 48 virtual void UpdateCursor(gfx::NativeCursor cursor) override; | 49 virtual void UpdateCursor(gfx::NativeCursor cursor) override; |
| 49 virtual void EndMoveLoop() override; | 50 virtual void EndMoveLoop() override; |
| 50 | 51 |
| 51 private: | 52 private: |
| 52 // Grabs the pointer, setting the mouse cursor to |cursor|. Returns true if | 53 // Grabs the pointer, setting the mouse cursor to |cursor|. Returns true if |
| 53 // successful. | 54 // successful. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 89 |
| 89 XMotionEvent last_xmotion_; | 90 XMotionEvent last_xmotion_; |
| 90 base::WeakPtrFactory<X11WholeScreenMoveLoop> weak_factory_; | 91 base::WeakPtrFactory<X11WholeScreenMoveLoop> weak_factory_; |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop); | 93 DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace views | 96 } // namespace views |
| 96 | 97 |
| 97 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ | 98 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ |
| OLD | NEW |