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

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

Issue 196213004: Allows menu host windows to be enumerated in DragTargetWindowFinder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implements menu XID caching and dispatches mouse drags in a posted task (test) Created 6 years, 9 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
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 "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/message_loop/message_pump_dispatcher.h" 10 #include "base/message_loop/message_pump_dispatcher.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Creates an input-only window to be used during the drag. 55 // Creates an input-only window to be used during the drag.
56 Window CreateDragInputWindow(XDisplay* display); 56 Window CreateDragInputWindow(XDisplay* display);
57 57
58 // Creates a window to show the drag image during the drag. 58 // Creates a window to show the drag image during the drag.
59 void CreateDragImageWindow(); 59 void CreateDragImageWindow();
60 60
61 // Checks to see if |in_image| is an image that has any visible regions 61 // Checks to see if |in_image| is an image that has any visible regions
62 // (defined as having a pixel with alpha > 32). If so, return true. 62 // (defined as having a pixel with alpha > 32). If so, return true.
63 bool CheckIfIconValid(); 63 bool CheckIfIconValid();
64 64
65 // Dispatch mouse movement event to |delegate_| in a posted task.
66 void DispatchMouseMovement();
67
65 X11WholeScreenMoveLoopDelegate* delegate_; 68 X11WholeScreenMoveLoopDelegate* delegate_;
66 69
67 // Are we running a nested message loop from RunMoveLoop()? 70 // Are we running a nested message loop from RunMoveLoop()?
68 bool in_move_loop_; 71 bool in_move_loop_;
69 72
70 bool should_reset_mouse_flags_; 73 bool should_reset_mouse_flags_;
71 74
72 // An invisible InputOnly window . We create this window so we can track the 75 // An invisible InputOnly window . We create this window so we can track the
73 // cursor wherever it goes on screen during a drag, since normal windows 76 // cursor wherever it goes on screen during a drag, since normal windows
74 // don't receive pointer motion events outside of their bounds. 77 // don't receive pointer motion events outside of their bounds.
75 ::Window grab_input_window_; 78 ::Window grab_input_window_;
76 79
77 base::Closure quit_closure_; 80 base::Closure quit_closure_;
78 81
79 // A Widget is created during the drag if there is an image available to be 82 // A Widget is created during the drag if there is an image available to be
80 // used during the drag. 83 // used during the drag.
81 scoped_ptr<Widget> drag_widget_; 84 scoped_ptr<Widget> drag_widget_;
82 gfx::ImageSkia drag_image_; 85 gfx::ImageSkia drag_image_;
83 gfx::Vector2dF drag_offset_; 86 gfx::Vector2dF drag_offset_;
87 XMotionEvent last_xmotion_;
88 bool motion_task_posted_;
84 89
85 DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop); 90 DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop);
86 }; 91 };
87 92
88 } // namespace views 93 } // namespace views
89 94
90 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_ 95 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_WHOLE_SCREEN_MOVE_LOOP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698