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

Side by Side Diff: ash/drag_drop/drag_drop_controller.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/drag_drop/drag_drop_controller.h" 5 #include "ash/drag_drop/drag_drop_controller.h"
6 6
7 #include "ash/drag_drop/drag_drop_tracker.h" 7 #include "ash/drag_drop/drag_drop_tracker.h"
8 #include "ash/drag_drop/drag_image_view.h" 8 #include "ash/drag_drop/drag_image_view.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/coordinate_conversion.h" 10 #include "ash/wm/coordinate_conversion.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 drag_image_offset_.y() + drag_image_vertical_offset)); 221 drag_image_offset_.y() + drag_image_vertical_offset));
222 } 222 }
223 223
224 drag_window_ = NULL; 224 drag_window_ = NULL;
225 225
226 // Ends cancel animation if it's in progress. 226 // Ends cancel animation if it's in progress.
227 if (cancel_animation_) 227 if (cancel_animation_)
228 cancel_animation_->End(); 228 cancel_animation_->End();
229 229
230 if (should_block_during_drag_drop_) { 230 if (should_block_during_drag_drop_) {
231 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); 231 base::RunLoop run_loop;
232 quit_closure_ = run_loop.QuitClosure(); 232 quit_closure_ = run_loop.QuitClosure();
233 base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); 233 base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
234 base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop); 234 base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
235 run_loop.Run(); 235 run_loop.Run();
236 } 236 }
237 237
238 if (!cancel_animation_.get() || !cancel_animation_->is_animating() || 238 if (!cancel_animation_.get() || !cancel_animation_->is_animating() ||
239 !pending_long_tap_.get()) { 239 !pending_long_tap_.get()) {
240 // If drag cancel animation is running, this cleanup is done when the 240 // If drag cancel animation is running, this cleanup is done when the
241 // animation completes. 241 // animation completes.
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 drag_window_->RemoveObserver(this); 557 drag_window_->RemoveObserver(this);
558 drag_window_ = NULL; 558 drag_window_ = NULL;
559 drag_data_ = NULL; 559 drag_data_ = NULL;
560 // Cleanup can be called again while deleting DragDropTracker, so use Pass 560 // Cleanup can be called again while deleting DragDropTracker, so use Pass
561 // instead of reset to avoid double free. 561 // instead of reset to avoid double free.
562 drag_drop_tracker_.Pass(); 562 drag_drop_tracker_.Pass();
563 } 563 }
564 564
565 } // namespace internal 565 } // namespace internal
566 } // namespace ash 566 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/test/ash_test_helper.cc » ('j') | chrome/browser/ui/views/simple_message_box_views.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698