| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |