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

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

Issue 154203002: Remove unnecessary uses of aura::Env::GetDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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 #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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 if (cursor_client) 403 if (cursor_client)
404 cursor_client->SetCursor(ui::kCursorPointer); 404 cursor_client->SetCursor(ui::kCursorPointer);
405 if (!AttemptToStartDrag(source, drag_location, HTCAPTION, move_source)) 405 if (!AttemptToStartDrag(source, drag_location, HTCAPTION, move_source))
406 return aura::client::MOVE_CANCELED; 406 return aura::client::MOVE_CANCELED;
407 407
408 in_move_loop_ = true; 408 in_move_loop_ = true;
409 bool destroyed = false; 409 bool destroyed = false;
410 destroyed_ = &destroyed; 410 destroyed_ = &destroyed;
411 base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); 411 base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
412 base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop); 412 base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
413 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); 413 base::RunLoop run_loop;
414 quit_closure_ = run_loop.QuitClosure(); 414 quit_closure_ = run_loop.QuitClosure();
415 run_loop.Run(); 415 run_loop.Run();
416 if (destroyed) 416 if (destroyed)
417 return aura::client::MOVE_CANCELED; 417 return aura::client::MOVE_CANCELED;
418 destroyed_ = NULL; 418 destroyed_ = NULL;
419 in_move_loop_ = false; 419 in_move_loop_ = false;
420 return drag_reverted_ ? aura::client::MOVE_CANCELED : 420 return drag_reverted_ ? aura::client::MOVE_CANCELED :
421 aura::client::MOVE_SUCCESSFUL; 421 aura::client::MOVE_SUCCESSFUL;
422 } 422 }
423 423
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 605
606 void ToplevelWindowEventHandler::ResizerWindowDestroyed() { 606 void ToplevelWindowEventHandler::ResizerWindowDestroyed() {
607 // We explicitly don't invoke RevertDrag() since that may do things to window. 607 // We explicitly don't invoke RevertDrag() since that may do things to window.
608 // Instead we destroy the resizer. 608 // Instead we destroy the resizer.
609 window_resizer_.reset(); 609 window_resizer_.reset();
610 610
611 CompleteDrag(DRAG_REVERT); 611 CompleteDrag(DRAG_REVERT);
612 } 612 }
613 613
614 } // namespace ash 614 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698