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 #include "ash/wm/toplevel_window_event_filter.h" | 5 #include "ash/wm/toplevel_window_event_handler.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/wm/default_window_resizer.h" | 8 #include "ash/wm/default_window_resizer.h" |
9 #include "ash/wm/property_util.h" | 9 #include "ash/wm/property_util.h" |
10 #include "ash/wm/resize_shadow_controller.h" | 10 #include "ash/wm/resize_shadow_controller.h" |
11 #include "ash/wm/window_resizer.h" | 11 #include "ash/wm/window_resizer.h" |
12 #include "ash/wm/window_util.h" | 12 #include "ash/wm/window_util.h" |
13 #include "ash/wm/workspace/snap_sizer.h" | 13 #include "ash/wm/workspace/snap_sizer.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
(...skipping 27 matching lines...) Expand all Loading... |
43 aura::Window::ConvertPointToTarget(window, window->parent(), &result); | 43 aura::Window::ConvertPointToTarget(window, window->parent(), &result); |
44 return result; | 44 return result; |
45 } | 45 } |
46 | 46 |
47 } // namespace | 47 } // namespace |
48 | 48 |
49 // ScopedWindowResizer --------------------------------------------------------- | 49 // ScopedWindowResizer --------------------------------------------------------- |
50 | 50 |
51 // Wraps a WindowResizer and installs an observer on its target window. When | 51 // Wraps a WindowResizer and installs an observer on its target window. When |
52 // the window is destroyed ResizerWindowDestroyed() is invoked back on the | 52 // the window is destroyed ResizerWindowDestroyed() is invoked back on the |
53 // ToplevelWindowEventFilter to clean up. | 53 // ToplevelWindowEventHandler to clean up. |
54 class ToplevelWindowEventFilter::ScopedWindowResizer | 54 class ToplevelWindowEventHandler::ScopedWindowResizer |
55 : public aura::WindowObserver { | 55 : public aura::WindowObserver { |
56 public: | 56 public: |
57 ScopedWindowResizer(ToplevelWindowEventFilter* filter, | 57 ScopedWindowResizer(ToplevelWindowEventHandler* handler, |
58 WindowResizer* resizer); | 58 WindowResizer* resizer); |
59 virtual ~ScopedWindowResizer(); | 59 virtual ~ScopedWindowResizer(); |
60 | 60 |
61 WindowResizer* resizer() { return resizer_.get(); } | 61 WindowResizer* resizer() { return resizer_.get(); } |
62 | 62 |
63 // WindowObserver overrides: | 63 // WindowObserver overrides: |
64 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 64 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
65 | 65 |
66 private: | 66 private: |
67 ToplevelWindowEventFilter* filter_; | 67 ToplevelWindowEventHandler* handler_; |
68 scoped_ptr<WindowResizer> resizer_; | 68 scoped_ptr<WindowResizer> resizer_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(ScopedWindowResizer); | 70 DISALLOW_COPY_AND_ASSIGN(ScopedWindowResizer); |
71 }; | 71 }; |
72 | 72 |
73 ToplevelWindowEventFilter::ScopedWindowResizer::ScopedWindowResizer( | 73 ToplevelWindowEventHandler::ScopedWindowResizer::ScopedWindowResizer( |
74 ToplevelWindowEventFilter* filter, | 74 ToplevelWindowEventHandler* handler, |
75 WindowResizer* resizer) | 75 WindowResizer* resizer) |
76 : filter_(filter), | 76 : handler_(handler), |
77 resizer_(resizer) { | 77 resizer_(resizer) { |
78 if (resizer_.get()) | 78 if (resizer_.get()) |
79 resizer_->GetTarget()->AddObserver(this); | 79 resizer_->GetTarget()->AddObserver(this); |
80 } | 80 } |
81 | 81 |
82 ToplevelWindowEventFilter::ScopedWindowResizer::~ScopedWindowResizer() { | 82 ToplevelWindowEventHandler::ScopedWindowResizer::~ScopedWindowResizer() { |
83 if (resizer_.get()) | 83 if (resizer_.get()) |
84 resizer_->GetTarget()->RemoveObserver(this); | 84 resizer_->GetTarget()->RemoveObserver(this); |
85 } | 85 } |
86 | 86 |
87 void ToplevelWindowEventFilter::ScopedWindowResizer::OnWindowDestroying( | 87 void ToplevelWindowEventHandler::ScopedWindowResizer::OnWindowDestroying( |
88 aura::Window* window) { | 88 aura::Window* window) { |
89 DCHECK(resizer_.get()); | 89 DCHECK(resizer_.get()); |
90 DCHECK_EQ(resizer_->GetTarget(), window); | 90 DCHECK_EQ(resizer_->GetTarget(), window); |
91 filter_->ResizerWindowDestroyed(); | 91 handler_->ResizerWindowDestroyed(); |
92 } | 92 } |
93 | 93 |
94 | 94 |
95 // ToplevelWindowEventFilter --------------------------------------------------- | 95 // ToplevelWindowEventHandler -------------------------------------------------- |
96 | 96 |
97 ToplevelWindowEventFilter::ToplevelWindowEventFilter(aura::Window* owner) | 97 ToplevelWindowEventHandler::ToplevelWindowEventHandler(aura::Window* owner) |
98 : in_move_loop_(false), | 98 : in_move_loop_(false), |
99 in_gesture_resize_(false) { | 99 in_gesture_resize_(false) { |
100 aura::client::SetWindowMoveClient(owner, this); | 100 aura::client::SetWindowMoveClient(owner, this); |
101 } | 101 } |
102 | 102 |
103 ToplevelWindowEventFilter::~ToplevelWindowEventFilter() { | 103 ToplevelWindowEventHandler::~ToplevelWindowEventHandler() { |
104 } | 104 } |
105 | 105 |
106 bool ToplevelWindowEventFilter::PreHandleKeyEvent(aura::Window* target, | 106 ui::EventResult ToplevelWindowEventHandler::OnKeyEvent(ui::KeyEvent* event) { |
107 ui::KeyEvent* event) { | |
108 if (window_resizer_.get() && event->type() == ui::ET_KEY_PRESSED && | 107 if (window_resizer_.get() && event->type() == ui::ET_KEY_PRESSED && |
109 event->key_code() == ui::VKEY_ESCAPE) { | 108 event->key_code() == ui::VKEY_ESCAPE) { |
110 CompleteDrag(DRAG_REVERT, event->flags()); | 109 CompleteDrag(DRAG_REVERT, event->flags()); |
111 } | 110 } |
112 return false; | 111 return ui::ER_UNHANDLED; |
113 } | 112 } |
114 | 113 |
115 bool ToplevelWindowEventFilter::PreHandleMouseEvent(aura::Window* target, | 114 ui::EventResult ToplevelWindowEventHandler::OnMouseEvent( |
116 ui::MouseEvent* event) { | 115 ui::MouseEvent* event) { |
117 if ((event->flags() & | 116 if ((event->flags() & |
118 (ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON)) != 0) | 117 (ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON)) != 0) |
119 return false; | 118 return ui::ER_UNHANDLED; |
120 | 119 |
| 120 aura::Window* target = static_cast<aura::Window*>(event->target()); |
121 switch (event->type()) { | 121 switch (event->type()) { |
122 case ui::ET_MOUSE_PRESSED: { | 122 case ui::ET_MOUSE_PRESSED: { |
123 // We also update the current window component here because for the | 123 // We also update the current window component here because for the |
124 // mouse-drag-release-press case, where the mouse is released and | 124 // mouse-drag-release-press case, where the mouse is released and |
125 // pressed without mouse move event. | 125 // pressed without mouse move event. |
126 int component = | 126 int component = |
127 target->delegate()->GetNonClientComponent(event->location()); | 127 target->delegate()->GetNonClientComponent(event->location()); |
128 if ((event->flags() & | 128 if ((event->flags() & |
129 (ui::EF_IS_DOUBLE_CLICK | ui::EF_IS_TRIPLE_CLICK)) == 0 && | 129 (ui::EF_IS_DOUBLE_CLICK | ui::EF_IS_TRIPLE_CLICK)) == 0 && |
130 WindowResizer::GetBoundsChangeForWindowComponent(component)) { | 130 WindowResizer::GetBoundsChangeForWindowComponent(component)) { |
131 gfx::Point location_in_parent( | 131 gfx::Point location_in_parent( |
132 ConvertPointToParent(target, event->location())); | 132 ConvertPointToParent(target, event->location())); |
133 CreateScopedWindowResizer(target, location_in_parent, component); | 133 CreateScopedWindowResizer(target, location_in_parent, component); |
134 } else { | 134 } else { |
135 window_resizer_.reset(); | 135 window_resizer_.reset(); |
136 } | 136 } |
137 return WindowResizer::GetBoundsChangeForWindowComponent(component) != 0; | 137 return WindowResizer::GetBoundsChangeForWindowComponent(component) != 0 ? |
| 138 ui::ER_CONSUMED : ui::ER_UNHANDLED; |
138 } | 139 } |
139 case ui::ET_MOUSE_DRAGGED: | 140 case ui::ET_MOUSE_DRAGGED: |
140 return HandleDrag(target, event); | 141 return HandleDrag(target, event) ? ui::ER_CONSUMED : ui::ER_UNHANDLED; |
141 case ui::ET_MOUSE_CAPTURE_CHANGED: | 142 case ui::ET_MOUSE_CAPTURE_CHANGED: |
142 case ui::ET_MOUSE_RELEASED: | 143 case ui::ET_MOUSE_RELEASED: |
143 CompleteDrag(event->type() == ui::ET_MOUSE_RELEASED ? | 144 CompleteDrag(event->type() == ui::ET_MOUSE_RELEASED ? |
144 DRAG_COMPLETE : DRAG_REVERT, | 145 DRAG_COMPLETE : DRAG_REVERT, |
145 event->flags()); | 146 event->flags()); |
146 if (in_move_loop_) { | 147 if (in_move_loop_) { |
147 quit_closure_.Run(); | 148 quit_closure_.Run(); |
148 in_move_loop_ = false; | 149 in_move_loop_ = false; |
149 } | 150 } |
150 // Completing the drag may result in hiding the window. If this happens | 151 // Completing the drag may result in hiding the window. If this happens |
151 // return true so no other filters/observers see the event. Otherwise they | 152 // return true so no other handlers/observers see the event. Otherwise |
152 // see the event on a hidden window. | 153 // they see the event on a hidden window. |
153 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED && | 154 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED && |
154 !target->IsVisible()) { | 155 !target->IsVisible()) { |
155 return true; | 156 return ui::ER_CONSUMED; |
156 } | 157 } |
157 break; | 158 break; |
158 case ui::ET_MOUSE_MOVED: | 159 case ui::ET_MOUSE_MOVED: |
159 return HandleMouseMoved(target, event); | 160 return HandleMouseMoved(target, event) ? |
| 161 ui::ER_CONSUMED : ui::ER_UNHANDLED; |
160 case ui::ET_MOUSE_EXITED: | 162 case ui::ET_MOUSE_EXITED: |
161 return HandleMouseExited(target, event); | 163 return HandleMouseExited(target, event) ? |
| 164 ui::ER_CONSUMED : ui::ER_UNHANDLED; |
162 default: | 165 default: |
163 break; | 166 break; |
164 } | 167 } |
165 return false; | 168 return ui::ER_UNHANDLED; |
166 } | 169 } |
167 | 170 |
168 ui::TouchStatus ToplevelWindowEventFilter::PreHandleTouchEvent( | 171 ui::EventResult ToplevelWindowEventHandler::OnScrollEvent( |
169 aura::Window* target, | 172 ui::ScrollEvent* event) { |
| 173 return ui::ER_UNHANDLED; |
| 174 } |
| 175 |
| 176 ui::TouchStatus ToplevelWindowEventHandler::OnTouchEvent( |
170 ui::TouchEvent* event) { | 177 ui::TouchEvent* event) { |
171 return ui::TOUCH_STATUS_UNKNOWN; | 178 return ui::TOUCH_STATUS_UNKNOWN; |
172 } | 179 } |
173 | 180 |
174 ui::EventResult ToplevelWindowEventFilter::PreHandleGestureEvent( | 181 ui::EventResult ToplevelWindowEventHandler::OnGestureEvent( |
175 aura::Window* target, | |
176 ui::GestureEvent* event) { | 182 ui::GestureEvent* event) { |
| 183 aura::Window* target = static_cast<aura::Window*>(event->target()); |
177 switch (event->type()) { | 184 switch (event->type()) { |
178 case ui::ET_GESTURE_SCROLL_BEGIN: { | 185 case ui::ET_GESTURE_SCROLL_BEGIN: { |
179 int component = | 186 int component = |
180 target->delegate()->GetNonClientComponent(event->location()); | 187 target->delegate()->GetNonClientComponent(event->location()); |
181 if (WindowResizer::GetBoundsChangeForWindowComponent(component) == 0) { | 188 if (WindowResizer::GetBoundsChangeForWindowComponent(component) == 0) { |
182 window_resizer_.reset(); | 189 window_resizer_.reset(); |
183 return ui::ER_UNHANDLED; | 190 return ui::ER_UNHANDLED; |
184 } | 191 } |
185 in_gesture_resize_ = true; | 192 in_gesture_resize_ = true; |
186 gfx::Point location_in_parent( | 193 gfx::Point location_in_parent( |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 } | 247 } |
241 break; | 248 break; |
242 } | 249 } |
243 default: | 250 default: |
244 return ui::ER_UNHANDLED; | 251 return ui::ER_UNHANDLED; |
245 } | 252 } |
246 | 253 |
247 return ui::ER_CONSUMED; | 254 return ui::ER_CONSUMED; |
248 } | 255 } |
249 | 256 |
250 void ToplevelWindowEventFilter::RunMoveLoop(aura::Window* source, | 257 void ToplevelWindowEventHandler::RunMoveLoop(aura::Window* source, |
251 const gfx::Point& drag_offset) { | 258 const gfx::Point& drag_offset) { |
252 DCHECK(!in_move_loop_); // Can only handle one nested loop at a time. | 259 DCHECK(!in_move_loop_); // Can only handle one nested loop at a time. |
253 in_move_loop_ = true; | 260 in_move_loop_ = true; |
254 aura::RootWindow* root_window = source->GetRootWindow(); | 261 aura::RootWindow* root_window = source->GetRootWindow(); |
255 DCHECK(root_window); | 262 DCHECK(root_window); |
256 gfx::Point drag_location; | 263 gfx::Point drag_location; |
257 if (aura::Env::GetInstance()->is_touch_down()) { | 264 if (aura::Env::GetInstance()->is_touch_down()) { |
258 in_gesture_resize_ = true; | 265 in_gesture_resize_ = true; |
259 bool has_point = root_window->gesture_recognizer()-> | 266 bool has_point = root_window->gesture_recognizer()-> |
260 GetLastTouchPointForTarget(source, &drag_location); | 267 GetLastTouchPointForTarget(source, &drag_location); |
261 DCHECK(has_point); | 268 DCHECK(has_point); |
262 } else { | 269 } else { |
263 drag_location = root_window->GetLastMouseLocationInRoot(); | 270 drag_location = root_window->GetLastMouseLocationInRoot(); |
264 aura::Window::ConvertPointToTarget( | 271 aura::Window::ConvertPointToTarget( |
265 root_window, source->parent(), &drag_location); | 272 root_window, source->parent(), &drag_location); |
266 } | 273 } |
267 CreateScopedWindowResizer(source, drag_location, HTCAPTION); | 274 CreateScopedWindowResizer(source, drag_location, HTCAPTION); |
268 source->GetRootWindow()->SetCursor(ui::kCursorPointer); | 275 source->GetRootWindow()->SetCursor(ui::kCursorPointer); |
269 #if !defined(OS_MACOSX) | 276 #if !defined(OS_MACOSX) |
270 MessageLoopForUI* loop = MessageLoopForUI::current(); | 277 MessageLoopForUI* loop = MessageLoopForUI::current(); |
271 MessageLoop::ScopedNestableTaskAllower allow_nested(loop); | 278 MessageLoop::ScopedNestableTaskAllower allow_nested(loop); |
272 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); | 279 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); |
273 quit_closure_ = run_loop.QuitClosure(); | 280 quit_closure_ = run_loop.QuitClosure(); |
274 run_loop.Run(); | 281 run_loop.Run(); |
275 #endif // !defined(OS_MACOSX) | 282 #endif // !defined(OS_MACOSX) |
276 in_gesture_resize_ = in_move_loop_ = false; | 283 in_gesture_resize_ = in_move_loop_ = false; |
277 } | 284 } |
278 | 285 |
279 void ToplevelWindowEventFilter::EndMoveLoop() { | 286 void ToplevelWindowEventHandler::EndMoveLoop() { |
280 if (!in_move_loop_) | 287 if (!in_move_loop_) |
281 return; | 288 return; |
282 | 289 |
283 in_move_loop_ = false; | 290 in_move_loop_ = false; |
284 if (window_resizer_.get()) { | 291 if (window_resizer_.get()) { |
285 window_resizer_->resizer()->RevertDrag(); | 292 window_resizer_->resizer()->RevertDrag(); |
286 window_resizer_.reset(); | 293 window_resizer_.reset(); |
287 } | 294 } |
288 quit_closure_.Run(); | 295 quit_closure_.Run(); |
289 } | 296 } |
290 | 297 |
291 // static | 298 // static |
292 WindowResizer* ToplevelWindowEventFilter::CreateWindowResizer( | 299 WindowResizer* ToplevelWindowEventHandler::CreateWindowResizer( |
293 aura::Window* window, | 300 aura::Window* window, |
294 const gfx::Point& point_in_parent, | 301 const gfx::Point& point_in_parent, |
295 int window_component) { | 302 int window_component) { |
296 if (!wm::IsWindowNormal(window)) | 303 if (!wm::IsWindowNormal(window)) |
297 return NULL; // Don't allow resizing/dragging maximized/fullscreen windows. | 304 return NULL; // Don't allow resizing/dragging maximized/fullscreen windows. |
298 return DefaultWindowResizer::Create( | 305 return DefaultWindowResizer::Create( |
299 window, point_in_parent, window_component); | 306 window, point_in_parent, window_component); |
300 } | 307 } |
301 | 308 |
302 | 309 |
303 void ToplevelWindowEventFilter::CreateScopedWindowResizer( | 310 void ToplevelWindowEventHandler::CreateScopedWindowResizer( |
304 aura::Window* window, | 311 aura::Window* window, |
305 const gfx::Point& point_in_parent, | 312 const gfx::Point& point_in_parent, |
306 int window_component) { | 313 int window_component) { |
307 window_resizer_.reset(); | 314 window_resizer_.reset(); |
308 WindowResizer* resizer = | 315 WindowResizer* resizer = |
309 CreateWindowResizer(window, point_in_parent, window_component); | 316 CreateWindowResizer(window, point_in_parent, window_component); |
310 if (resizer) | 317 if (resizer) |
311 window_resizer_.reset(new ScopedWindowResizer(this, resizer)); | 318 window_resizer_.reset(new ScopedWindowResizer(this, resizer)); |
312 } | 319 } |
313 | 320 |
314 void ToplevelWindowEventFilter::CompleteDrag(DragCompletionStatus status, | 321 void ToplevelWindowEventHandler::CompleteDrag(DragCompletionStatus status, |
315 int event_flags) { | 322 int event_flags) { |
316 scoped_ptr<ScopedWindowResizer> resizer(window_resizer_.release()); | 323 scoped_ptr<ScopedWindowResizer> resizer(window_resizer_.release()); |
317 if (resizer.get()) { | 324 if (resizer.get()) { |
318 if (status == DRAG_COMPLETE) | 325 if (status == DRAG_COMPLETE) |
319 resizer->resizer()->CompleteDrag(event_flags); | 326 resizer->resizer()->CompleteDrag(event_flags); |
320 else | 327 else |
321 resizer->resizer()->RevertDrag(); | 328 resizer->resizer()->RevertDrag(); |
322 } | 329 } |
323 } | 330 } |
324 | 331 |
325 bool ToplevelWindowEventFilter::HandleDrag(aura::Window* target, | 332 bool ToplevelWindowEventHandler::HandleDrag(aura::Window* target, |
326 ui::LocatedEvent* event) { | 333 ui::LocatedEvent* event) { |
327 // This function only be triggered to move window | 334 // This function only be triggered to move window |
328 // by mouse drag or touch move event. | 335 // by mouse drag or touch move event. |
329 DCHECK(event->type() == ui::ET_MOUSE_DRAGGED || | 336 DCHECK(event->type() == ui::ET_MOUSE_DRAGGED || |
330 event->type() == ui::ET_TOUCH_MOVED || | 337 event->type() == ui::ET_TOUCH_MOVED || |
331 event->type() == ui::ET_GESTURE_SCROLL_UPDATE); | 338 event->type() == ui::ET_GESTURE_SCROLL_UPDATE); |
332 | 339 |
333 if (!window_resizer_.get()) | 340 if (!window_resizer_.get()) |
334 return false; | 341 return false; |
335 window_resizer_->resizer()->Drag( | 342 window_resizer_->resizer()->Drag( |
336 ConvertPointToParent(target, event->location()), event->flags()); | 343 ConvertPointToParent(target, event->location()), event->flags()); |
337 return true; | 344 return true; |
338 } | 345 } |
339 | 346 |
340 bool ToplevelWindowEventFilter::HandleMouseMoved(aura::Window* target, | 347 bool ToplevelWindowEventHandler::HandleMouseMoved(aura::Window* target, |
341 ui::LocatedEvent* event) { | 348 ui::LocatedEvent* event) { |
342 // TODO(jamescook): Move the resize cursor update code into here from | 349 // TODO(jamescook): Move the resize cursor update code into here from |
343 // CompoundEventFilter? | 350 // CompoundEventFilter? |
344 internal::ResizeShadowController* controller = | 351 internal::ResizeShadowController* controller = |
345 Shell::GetInstance()->resize_shadow_controller(); | 352 Shell::GetInstance()->resize_shadow_controller(); |
346 if (controller) { | 353 if (controller) { |
347 if (event->flags() & ui::EF_IS_NON_CLIENT) { | 354 if (event->flags() & ui::EF_IS_NON_CLIENT) { |
348 int component = | 355 int component = |
349 target->delegate()->GetNonClientComponent(event->location()); | 356 target->delegate()->GetNonClientComponent(event->location()); |
350 controller->ShowShadow(target, component); | 357 controller->ShowShadow(target, component); |
351 } else { | 358 } else { |
352 controller->HideShadow(target); | 359 controller->HideShadow(target); |
353 } | 360 } |
354 } | 361 } |
355 return false; | 362 return false; |
356 } | 363 } |
357 | 364 |
358 bool ToplevelWindowEventFilter::HandleMouseExited(aura::Window* target, | 365 bool ToplevelWindowEventHandler::HandleMouseExited(aura::Window* target, |
359 ui::LocatedEvent* event) { | 366 ui::LocatedEvent* event) { |
360 internal::ResizeShadowController* controller = | 367 internal::ResizeShadowController* controller = |
361 Shell::GetInstance()->resize_shadow_controller(); | 368 Shell::GetInstance()->resize_shadow_controller(); |
362 if (controller) | 369 if (controller) |
363 controller->HideShadow(target); | 370 controller->HideShadow(target); |
364 return false; | 371 return false; |
365 } | 372 } |
366 | 373 |
367 void ToplevelWindowEventFilter::ResizerWindowDestroyed() { | 374 void ToplevelWindowEventHandler::ResizerWindowDestroyed() { |
368 // We explicitly don't invoke RevertDrag() since that may do things to window. | 375 // We explicitly don't invoke RevertDrag() since that may do things to window. |
369 // Instead we destroy the resizer. | 376 // Instead we destroy the resizer. |
370 window_resizer_.reset(); | 377 window_resizer_.reset(); |
371 | 378 |
372 // End the move loop. This does nothing if we're not in a move loop. | 379 // End the move loop. This does nothing if we're not in a move loop. |
373 EndMoveLoop(); | 380 EndMoveLoop(); |
374 } | 381 } |
375 | 382 |
376 } // namespace ash | 383 } // namespace ash |
OLD | NEW |