| 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 namespace { | 572 namespace { |
| 573 | 573 |
| 574 // We need both MaskedWindowTargeter and MaskedWindowDelegate as they | 574 // We need both MaskedWindowTargeter and MaskedWindowDelegate as they |
| 575 // are used in two different pathes. crbug.com/493354. | 575 // are used in two different pathes. crbug.com/493354. |
| 576 class MaskedWindowTargeter : public aura::WindowTargeter { | 576 class MaskedWindowTargeter : public aura::WindowTargeter { |
| 577 public: | 577 public: |
| 578 MaskedWindowTargeter() {} | 578 MaskedWindowTargeter() {} |
| 579 ~MaskedWindowTargeter() override {} | 579 ~MaskedWindowTargeter() override {} |
| 580 | 580 |
| 581 // aura::WindowTargeter: | 581 // aura::WindowTargeter: |
| 582 bool EventLocationInsideBounds(ui::EventTarget* target, | 582 bool EventLocationInsideBounds(aura::Window* target, |
| 583 const ui::LocatedEvent& event) const override { | 583 const ui::LocatedEvent& event) const override { |
| 584 aura::Window* window = static_cast<aura::Window*>(target); | 584 aura::Window* window = static_cast<aura::Window*>(target); |
| 585 gfx::Point local_point = event.location(); | 585 gfx::Point local_point = event.location(); |
| 586 if (window->parent()) | 586 if (window->parent()) |
| 587 aura::Window::ConvertPointToTarget(window->parent(), window, | 587 aura::Window::ConvertPointToTarget(window->parent(), window, |
| 588 &local_point); | 588 &local_point); |
| 589 return window->GetEventHandlerForPoint(local_point); | 589 return window->GetEventHandlerForPoint(local_point); |
| 590 } | 590 } |
| 591 | 591 |
| 592 private: | 592 private: |
| (...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2354 DetachToBrowserTabDragControllerTest, | 2354 DetachToBrowserTabDragControllerTest, |
| 2355 ::testing::Values("mouse", "touch")); | 2355 ::testing::Values("mouse", "touch")); |
| 2356 INSTANTIATE_TEST_CASE_P(TabDragging, | 2356 INSTANTIATE_TEST_CASE_P(TabDragging, |
| 2357 DetachToBrowserTabDragControllerTestTouch, | 2357 DetachToBrowserTabDragControllerTestTouch, |
| 2358 ::testing::Values("touch")); | 2358 ::testing::Values("touch")); |
| 2359 #elif defined(USE_ASH) | 2359 #elif defined(USE_ASH) |
| 2360 INSTANTIATE_TEST_CASE_P(TabDragging, | 2360 INSTANTIATE_TEST_CASE_P(TabDragging, |
| 2361 DetachToBrowserTabDragControllerTest, | 2361 DetachToBrowserTabDragControllerTest, |
| 2362 ::testing::Values("mouse")); | 2362 ::testing::Values("mouse")); |
| 2363 #endif | 2363 #endif |
| OLD | NEW |