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

Side by Side Diff: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h

Issue 2828913003: Replace "nested message loop" with "nested run loop" in comments. (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/x11_move_loop.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 namespace ui { 27 namespace ui {
28 class MouseEvent; 28 class MouseEvent;
29 class ScopedEventDispatcher; 29 class ScopedEventDispatcher;
30 class XScopedEventSelector; 30 class XScopedEventSelector;
31 } 31 }
32 32
33 namespace views { 33 namespace views {
34 34
35 // Runs a nested message loop and grabs the mouse. This is used to implement 35 // Runs a nested run loop and grabs the mouse. This is used to implement
36 // dragging. 36 // dragging.
37 class X11WholeScreenMoveLoop : public X11MoveLoop, 37 class X11WholeScreenMoveLoop : public X11MoveLoop,
38 public ui::PlatformEventDispatcher { 38 public ui::PlatformEventDispatcher {
39 public: 39 public:
40 explicit X11WholeScreenMoveLoop(X11MoveLoopDelegate* delegate); 40 explicit X11WholeScreenMoveLoop(X11MoveLoopDelegate* delegate);
41 ~X11WholeScreenMoveLoop() override; 41 ~X11WholeScreenMoveLoop() override;
42 42
43 // ui:::PlatformEventDispatcher: 43 // ui:::PlatformEventDispatcher:
44 bool CanDispatchEvent(const ui::PlatformEvent& event) override; 44 bool CanDispatchEvent(const ui::PlatformEvent& event) override;
45 uint32_t DispatchEvent(const ui::PlatformEvent& event) override; 45 uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
(...skipping 11 matching lines...) Expand all
57 void GrabEscKey(); 57 void GrabEscKey();
58 58
59 // Creates an input-only window to be used during the drag. 59 // Creates an input-only window to be used during the drag.
60 void CreateDragInputWindow(XDisplay* display); 60 void CreateDragInputWindow(XDisplay* display);
61 61
62 // Dispatch mouse movement event to |delegate_| in a posted task. 62 // Dispatch mouse movement event to |delegate_| in a posted task.
63 void DispatchMouseMovement(); 63 void DispatchMouseMovement();
64 64
65 X11MoveLoopDelegate* delegate_; 65 X11MoveLoopDelegate* delegate_;
66 66
67 // Are we running a nested message loop from RunMoveLoop()? 67 // Are we running a nested run loop from RunMoveLoop()?
68 bool in_move_loop_; 68 bool in_move_loop_;
69 std::unique_ptr<ui::ScopedEventDispatcher> nested_dispatcher_; 69 std::unique_ptr<ui::ScopedEventDispatcher> nested_dispatcher_;
70 70
71 // Cursor in use prior to the move loop starting. Restored when the move loop 71 // Cursor in use prior to the move loop starting. Restored when the move loop
72 // quits. 72 // quits.
73 gfx::NativeCursor initial_cursor_; 73 gfx::NativeCursor initial_cursor_;
74 74
75 bool should_reset_mouse_flags_; 75 bool should_reset_mouse_flags_;
76 76
77 // An invisible InputOnly window. Keyboard grab and sometimes mouse grab 77 // An invisible InputOnly window. Keyboard grab and sometimes mouse grab
(...skipping 14 matching lines...) Expand all
92 92
93 std::unique_ptr<ui::MouseEvent> last_motion_in_screen_; 93 std::unique_ptr<ui::MouseEvent> last_motion_in_screen_;
94 base::WeakPtrFactory<X11WholeScreenMoveLoop> weak_factory_; 94 base::WeakPtrFactory<X11WholeScreenMoveLoop> weak_factory_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop); 96 DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop);
97 }; 97 };
98 98
99 } // namespace views 99 } // namespace views
100 100
101 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ 101 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/x11_move_loop.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698