| 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_handler.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/resize_shadow_controller.h" | 8 #include "ash/wm/resize_shadow_controller.h" |
| 9 #include "ash/wm/window_resizer.h" | 9 #include "ash/wm/window_resizer.h" |
| 10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 aura::client::CursorClient* cursor_client = | 414 aura::client::CursorClient* cursor_client = |
| 415 aura::client::GetCursorClient(root_window); | 415 aura::client::GetCursorClient(root_window); |
| 416 if (cursor_client) | 416 if (cursor_client) |
| 417 cursor_client->SetCursor(ui::kCursorPointer); | 417 cursor_client->SetCursor(ui::kCursorPointer); |
| 418 if (!AttemptToStartDrag(source, drag_location, HTCAPTION, move_source)) | 418 if (!AttemptToStartDrag(source, drag_location, HTCAPTION, move_source)) |
| 419 return aura::client::MOVE_CANCELED; | 419 return aura::client::MOVE_CANCELED; |
| 420 | 420 |
| 421 in_move_loop_ = true; | 421 in_move_loop_ = true; |
| 422 bool destroyed = false; | 422 bool destroyed = false; |
| 423 destroyed_ = &destroyed; | 423 destroyed_ = &destroyed; |
| 424 base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); | 424 base::MessageLoop* loop = base::MessageLoop::current(); |
| 425 base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop); | 425 base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop); |
| 426 base::RunLoop run_loop; | 426 base::RunLoop run_loop; |
| 427 quit_closure_ = run_loop.QuitClosure(); | 427 quit_closure_ = run_loop.QuitClosure(); |
| 428 run_loop.Run(); | 428 run_loop.Run(); |
| 429 if (destroyed) | 429 if (destroyed) |
| 430 return aura::client::MOVE_CANCELED; | 430 return aura::client::MOVE_CANCELED; |
| 431 destroyed_ = NULL; | 431 destroyed_ = NULL; |
| 432 in_move_loop_ = false; | 432 in_move_loop_ = false; |
| 433 return drag_reverted_ ? aura::client::MOVE_CANCELED : | 433 return drag_reverted_ ? aura::client::MOVE_CANCELED : |
| 434 aura::client::MOVE_SUCCESSFUL; | 434 aura::client::MOVE_SUCCESSFUL; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 default: | 628 default: |
| 629 NOTREACHED(); | 629 NOTREACHED(); |
| 630 } | 630 } |
| 631 } | 631 } |
| 632 | 632 |
| 633 void ToplevelWindowEventHandler::ResizerWindowDestroyed() { | 633 void ToplevelWindowEventHandler::ResizerWindowDestroyed() { |
| 634 CompleteDrag(DRAG_RESIZER_WINDOW_DESTROYED); | 634 CompleteDrag(DRAG_RESIZER_WINDOW_DESTROYED); |
| 635 } | 635 } |
| 636 | 636 |
| 637 } // namespace ash | 637 } // namespace ash |
| OLD | NEW |