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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h" 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 public: 89 public:
90 QuitDraggingObserver() { 90 QuitDraggingObserver() {
91 registrar_.Add(this, chrome::NOTIFICATION_TAB_DRAG_LOOP_DONE, 91 registrar_.Add(this, chrome::NOTIFICATION_TAB_DRAG_LOOP_DONE,
92 content::NotificationService::AllSources()); 92 content::NotificationService::AllSources());
93 } 93 }
94 94
95 void Observe(int type, 95 void Observe(int type,
96 const content::NotificationSource& source, 96 const content::NotificationSource& source,
97 const content::NotificationDetails& details) override { 97 const content::NotificationDetails& details) override {
98 DCHECK_EQ(chrome::NOTIFICATION_TAB_DRAG_LOOP_DONE, type); 98 DCHECK_EQ(chrome::NOTIFICATION_TAB_DRAG_LOOP_DONE, type);
99 base::MessageLoopForUI::current()->Quit(); 99 base::MessageLoopForUI::current()->QuitWhenIdle();
100 delete this; 100 delete this;
101 } 101 }
102 102
103 private: 103 private:
104 ~QuitDraggingObserver() override {} 104 ~QuitDraggingObserver() override {}
105 105
106 content::NotificationRegistrar registrar_; 106 content::NotificationRegistrar registrar_;
107 107
108 DISALLOW_COPY_AND_ASSIGN(QuitDraggingObserver); 108 DISALLOW_COPY_AND_ASSIGN(QuitDraggingObserver);
109 }; 109 };
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 DetachToBrowserTabDragControllerTest, 2353 DetachToBrowserTabDragControllerTest,
2354 ::testing::Values("mouse", "touch")); 2354 ::testing::Values("mouse", "touch"));
2355 INSTANTIATE_TEST_CASE_P(TabDragging, 2355 INSTANTIATE_TEST_CASE_P(TabDragging,
2356 DetachToBrowserTabDragControllerTestTouch, 2356 DetachToBrowserTabDragControllerTestTouch,
2357 ::testing::Values("touch")); 2357 ::testing::Values("touch"));
2358 #elif defined(USE_ASH) 2358 #elif defined(USE_ASH)
2359 INSTANTIATE_TEST_CASE_P(TabDragging, 2359 INSTANTIATE_TEST_CASE_P(TabDragging,
2360 DetachToBrowserTabDragControllerTest, 2360 DetachToBrowserTabDragControllerTest,
2361 ::testing::Values("mouse")); 2361 ::testing::Values("mouse"));
2362 #endif 2362 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/keyboard_access_browsertest.cc ('k') | chrome/browser/ui/views/web_dialog_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698