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

Side by Side Diff: ash/wm/toplevel_window_event_handler.h

Issue 12441010: Attach panel while dragging to bring it in front of other panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Check that dragged panel is in panel container before stacking at top. Created 7 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 | Annotate | Revision Log
OLDNEW
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 ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ 5 #ifndef ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_
6 #define ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ 6 #define ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 19 matching lines...) Expand all
30 class WindowResizer; 30 class WindowResizer;
31 31
32 class ASH_EXPORT ToplevelWindowEventHandler 32 class ASH_EXPORT ToplevelWindowEventHandler
33 : public ui::EventHandler, 33 : public ui::EventHandler,
34 public aura::client::WindowMoveClient, 34 public aura::client::WindowMoveClient,
35 public DisplayController::Observer { 35 public DisplayController::Observer {
36 public: 36 public:
37 explicit ToplevelWindowEventHandler(aura::Window* owner); 37 explicit ToplevelWindowEventHandler(aura::Window* owner);
38 virtual ~ToplevelWindowEventHandler(); 38 virtual ~ToplevelWindowEventHandler();
39 39
40 aura::Window* owner() const { return owner_; }
sky 2013/03/18 16:17:47 const aura::Window* owner() const If you need a no
flackr 2013/03/20 01:59:32 Done.
41
40 // Overridden from ui::EventHandler: 42 // Overridden from ui::EventHandler:
41 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; 43 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
42 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; 44 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
43 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 45 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
44 46
45 // Overridden form aura::client::WindowMoveClient: 47 // Overridden form aura::client::WindowMoveClient:
46 virtual aura::client::WindowMoveResult RunMoveLoop( 48 virtual aura::client::WindowMoveResult RunMoveLoop(
47 aura::Window* source, 49 aura::Window* source,
48 const gfx::Vector2d& drag_offset, 50 const gfx::Vector2d& drag_offset,
49 aura::client::WindowMoveSource move_source) OVERRIDE; 51 aura::client::WindowMoveSource move_source) OVERRIDE;
(...skipping 28 matching lines...) Expand all
78 // Return value is returned by OnMouseEvent() above. 80 // Return value is returned by OnMouseEvent() above.
79 void HandleMouseMoved(aura::Window* target, ui::LocatedEvent* event); 81 void HandleMouseMoved(aura::Window* target, ui::LocatedEvent* event);
80 82
81 // Called for mouse exits to hide window resize shadows. 83 // Called for mouse exits to hide window resize shadows.
82 // Return value is returned by OnMouseEvent() above. 84 // Return value is returned by OnMouseEvent() above.
83 void HandleMouseExited(aura::Window* target, ui::LocatedEvent* event); 85 void HandleMouseExited(aura::Window* target, ui::LocatedEvent* event);
84 86
85 // Invoked from ScopedWindowResizer if the window is destroyed. 87 // Invoked from ScopedWindowResizer if the window is destroyed.
86 void ResizerWindowDestroyed(); 88 void ResizerWindowDestroyed();
87 89
90 // The container which this event handler is handling events on.
91 aura::Window* owner_;
92
88 // Are we running a nested message loop from RunMoveLoop(). 93 // Are we running a nested message loop from RunMoveLoop().
89 bool in_move_loop_; 94 bool in_move_loop_;
90 95
91 // Was the move operation cancelled? Used only when the nested loop 96 // Was the move operation cancelled? Used only when the nested loop
92 // is used to move a window. 97 // is used to move a window.
93 bool move_cancelled_; 98 bool move_cancelled_;
94 99
95 // Is a window move/resize in progress because of gesture events? 100 // Is a window move/resize in progress because of gesture events?
96 bool in_gesture_drag_; 101 bool in_gesture_drag_;
97 102
(...skipping 10 matching lines...) Expand all
108 // Used to track if this object is deleted while running a nested message 113 // Used to track if this object is deleted while running a nested message
109 // loop. If non-null the destructor sets this to true. 114 // loop. If non-null the destructor sets this to true.
110 bool* destroyed_; 115 bool* destroyed_;
111 116
112 DISALLOW_COPY_AND_ASSIGN(ToplevelWindowEventHandler); 117 DISALLOW_COPY_AND_ASSIGN(ToplevelWindowEventHandler);
113 }; 118 };
114 119
115 } // namespace aura 120 } // namespace aura
116 121
117 #endif // ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_ 122 #endif // ASH_WM_TOPLEVEL_WINDOW_EVENT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698