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 "ash/wm/window_settings.h" | 7 #include "ash/wm/window_state.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_commands.h" | 15 #include "chrome/browser/ui/browser_commands.h" |
16 #include "chrome/browser/ui/browser_iterator.h" | 16 #include "chrome/browser/ui/browser_iterator.h" |
17 #include "chrome/browser/ui/browser_list.h" | 17 #include "chrome/browser/ui/browser_list.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 int GetDetachY(TabStrip* tab_strip) { | 206 int GetDetachY(TabStrip* tab_strip) { |
207 return std::max(TabDragController::kTouchVerticalDetachMagnetism, | 207 return std::max(TabDragController::kTouchVerticalDetachMagnetism, |
208 TabDragController::kVerticalDetachMagnetism) + | 208 TabDragController::kVerticalDetachMagnetism) + |
209 tab_strip->height() + 1; | 209 tab_strip->height() + 1; |
210 } | 210 } |
211 | 211 |
212 bool GetTrackedByWorkspace(Browser* browser) { | 212 bool GetTrackedByWorkspace(Browser* browser) { |
213 #if !defined(USE_ASH) || defined(OS_WIN) // TODO(win_ash) | 213 #if !defined(USE_ASH) || defined(OS_WIN) // TODO(win_ash) |
214 return true; | 214 return true; |
215 #else | 215 #else |
216 return ash::wm::GetWindowSettings(browser->window()->GetNativeWindow())-> | 216 return ash::wm::GetWindowState(browser->window()->GetNativeWindow())-> |
217 tracked_by_workspace(); | 217 tracked_by_workspace(); |
218 #endif | 218 #endif |
219 } | 219 } |
220 | 220 |
221 } // namespace | 221 } // namespace |
222 | 222 |
223 #if defined(USE_ASH) && !defined(OS_WIN) // TODO(win_ash) | 223 #if defined(USE_ASH) && !defined(OS_WIN) // TODO(win_ash) |
224 class ScreenEventGeneratorDelegate : public aura::test::EventGeneratorDelegate { | 224 class ScreenEventGeneratorDelegate : public aura::test::EventGeneratorDelegate { |
225 public: | 225 public: |
226 explicit ScreenEventGeneratorDelegate(aura::RootWindow* root_window) | 226 explicit ScreenEventGeneratorDelegate(aura::RootWindow* root_window) |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 | 552 |
553 namespace { | 553 namespace { |
554 | 554 |
555 void DetachToOwnWindowStep2(DetachToBrowserTabDragControllerTest* test) { | 555 void DetachToOwnWindowStep2(DetachToBrowserTabDragControllerTest* test) { |
556 if (test->input_source() == INPUT_SOURCE_TOUCH) | 556 if (test->input_source() == INPUT_SOURCE_TOUCH) |
557 ASSERT_TRUE(test->ReleaseInput()); | 557 ASSERT_TRUE(test->ReleaseInput()); |
558 } | 558 } |
559 | 559 |
560 #if defined(USE_ASH) && !defined(OS_WIN) // TODO(win_ash) | 560 #if defined(USE_ASH) && !defined(OS_WIN) // TODO(win_ash) |
561 bool IsWindowPositionManaged(aura::Window* window) { | 561 bool IsWindowPositionManaged(aura::Window* window) { |
562 return ash::wm::GetWindowSettings(window)->window_position_managed(); | 562 return ash::wm::GetWindowState(window)->window_position_managed(); |
563 } | 563 } |
564 bool HasUserChangedWindowPositionOrSize(aura::Window* window) { | 564 bool HasUserChangedWindowPositionOrSize(aura::Window* window) { |
565 return ash::wm::GetWindowSettings(window)->bounds_changed_by_user(); | 565 return ash::wm::GetWindowState(window)->bounds_changed_by_user(); |
566 } | 566 } |
567 #else | 567 #else |
568 bool IsWindowPositionManaged(gfx::NativeWindow window) { | 568 bool IsWindowPositionManaged(gfx::NativeWindow window) { |
569 return true; | 569 return true; |
570 } | 570 } |
571 bool HasUserChangedWindowPositionOrSize(gfx::NativeWindow window) { | 571 bool HasUserChangedWindowPositionOrSize(gfx::NativeWindow window) { |
572 return false; | 572 return false; |
573 } | 573 } |
574 #endif | 574 #endif |
575 | 575 |
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1878 DifferentDeviceScaleFactorDisplayTabDragControllerTest, | 1878 DifferentDeviceScaleFactorDisplayTabDragControllerTest, |
1879 ::testing::Values("mouse")); | 1879 ::testing::Values("mouse")); |
1880 INSTANTIATE_TEST_CASE_P(TabDragging, | 1880 INSTANTIATE_TEST_CASE_P(TabDragging, |
1881 DetachToBrowserTabDragControllerTest, | 1881 DetachToBrowserTabDragControllerTest, |
1882 ::testing::Values("mouse", "touch")); | 1882 ::testing::Values("mouse", "touch")); |
1883 #else | 1883 #else |
1884 INSTANTIATE_TEST_CASE_P(TabDragging, | 1884 INSTANTIATE_TEST_CASE_P(TabDragging, |
1885 DetachToBrowserTabDragControllerTest, | 1885 DetachToBrowserTabDragControllerTest, |
1886 ::testing::Values("mouse")); | 1886 ::testing::Values("mouse")); |
1887 #endif | 1887 #endif |
OLD | NEW |