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_state.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" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 return ash::wm::GetWindowState(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::Window* root_window) |
227 : root_window_(root_window) {} | 227 : root_window_(root_window) {} |
228 virtual ~ScreenEventGeneratorDelegate() {} | 228 virtual ~ScreenEventGeneratorDelegate() {} |
229 | 229 |
230 // EventGeneratorDelegate overrides: | 230 // EventGeneratorDelegate overrides: |
231 virtual aura::RootWindow* GetRootWindowAt( | 231 virtual aura::RootWindow* GetRootWindowAt( |
232 const gfx::Point& point) const OVERRIDE { | 232 const gfx::Point& point) const OVERRIDE { |
233 return root_window_; | 233 return root_window_->GetDispatcher(); |
234 } | 234 } |
235 | 235 |
236 virtual aura::client::ScreenPositionClient* GetScreenPositionClient( | 236 virtual aura::client::ScreenPositionClient* GetScreenPositionClient( |
237 const aura::Window* window) const OVERRIDE { | 237 const aura::Window* window) const OVERRIDE { |
238 return aura::client::GetScreenPositionClient(root_window_); | 238 return aura::client::GetScreenPositionClient(root_window_); |
239 } | 239 } |
240 | 240 |
241 private: | 241 private: |
242 aura::RootWindow* root_window_; | 242 aura::Window* root_window_; |
243 | 243 |
244 DISALLOW_COPY_AND_ASSIGN(ScreenEventGeneratorDelegate); | 244 DISALLOW_COPY_AND_ASSIGN(ScreenEventGeneratorDelegate); |
245 }; | 245 }; |
246 | 246 |
247 #endif | 247 #endif |
248 | 248 |
249 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | 249 #if defined(USE_AURA) && !defined(OS_CHROMEOS) |
250 | 250 |
251 // Following classes verify a crash scenario. Specifically on Windows when focus | 251 // Following classes verify a crash scenario. Specifically on Windows when focus |
252 // changes it can trigger capture being lost. This was causing a crash in tab | 252 // changes it can trigger capture being lost. This was causing a crash in tab |
(...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 DetachToBrowserTabDragControllerTest, | 2047 DetachToBrowserTabDragControllerTest, |
2048 ::testing::Values("mouse", "touch")); | 2048 ::testing::Values("mouse", "touch")); |
2049 INSTANTIATE_TEST_CASE_P(TabDragging, | 2049 INSTANTIATE_TEST_CASE_P(TabDragging, |
2050 DetachToBrowserTabDragControllerTestTouch, | 2050 DetachToBrowserTabDragControllerTestTouch, |
2051 ::testing::Values("touch", "touch docked")); | 2051 ::testing::Values("touch", "touch docked")); |
2052 #else | 2052 #else |
2053 INSTANTIATE_TEST_CASE_P(TabDragging, | 2053 INSTANTIATE_TEST_CASE_P(TabDragging, |
2054 DetachToBrowserTabDragControllerTest, | 2054 DetachToBrowserTabDragControllerTest, |
2055 ::testing::Values("mouse")); | 2055 ::testing::Values("mouse")); |
2056 #endif | 2056 #endif |
OLD | NEW |