OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "ash/accessibility_delegate.h" | 7 #include "ash/accessibility_delegate.h" |
8 #include "ash/drag_drop/drag_drop_controller.h" | 8 #include "ash/drag_drop/drag_drop_controller.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "ui/views/widget/widget_delegate.h" | 49 #include "ui/views/widget/widget_delegate.h" |
50 #include "ui/wm/core/window_util.h" | 50 #include "ui/wm/core/window_util.h" |
51 #include "ui/wm/public/activation_delegate.h" | 51 #include "ui/wm/public/activation_delegate.h" |
52 | 52 |
53 namespace ash { | 53 namespace ash { |
54 namespace { | 54 namespace { |
55 | 55 |
56 class NonActivatableActivationDelegate | 56 class NonActivatableActivationDelegate |
57 : public aura::client::ActivationDelegate { | 57 : public aura::client::ActivationDelegate { |
58 public: | 58 public: |
59 virtual bool ShouldActivate() const OVERRIDE { | 59 virtual bool ShouldActivate() const override { |
60 return false; | 60 return false; |
61 } | 61 } |
62 }; | 62 }; |
63 | 63 |
64 void CancelDrag(DragDropController* controller, bool* canceled) { | 64 void CancelDrag(DragDropController* controller, bool* canceled) { |
65 if (controller->IsDragDropInProgress()) { | 65 if (controller->IsDragDropInProgress()) { |
66 *canceled = true; | 66 *canceled = true; |
67 controller->DragCancel(); | 67 controller->DragCancel(); |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 } // namespace | 71 } // namespace |
72 | 72 |
73 class WindowSelectorTest : public test::AshTestBase { | 73 class WindowSelectorTest : public test::AshTestBase { |
74 public: | 74 public: |
75 WindowSelectorTest() {} | 75 WindowSelectorTest() {} |
76 virtual ~WindowSelectorTest() {} | 76 virtual ~WindowSelectorTest() {} |
77 | 77 |
78 virtual void SetUp() OVERRIDE { | 78 virtual void SetUp() override { |
79 test::AshTestBase::SetUp(); | 79 test::AshTestBase::SetUp(); |
80 ASSERT_TRUE(test::TestShelfDelegate::instance()); | 80 ASSERT_TRUE(test::TestShelfDelegate::instance()); |
81 | 81 |
82 shelf_view_test_.reset(new test::ShelfViewTestAPI( | 82 shelf_view_test_.reset(new test::ShelfViewTestAPI( |
83 test::ShelfTestAPI(Shelf::ForPrimaryDisplay()).shelf_view())); | 83 test::ShelfTestAPI(Shelf::ForPrimaryDisplay()).shelf_view())); |
84 shelf_view_test_->SetAnimationDuration(1); | 84 shelf_view_test_->SetAnimationDuration(1); |
85 } | 85 } |
86 | 86 |
87 aura::Window* CreateWindow(const gfx::Rect& bounds) { | 87 aura::Window* CreateWindow(const gfx::Rect& bounds) { |
88 return CreateTestWindowInShellWithDelegate(&delegate_, -1, bounds); | 88 return CreateTestWindowInShellWithDelegate(&delegate_, -1, bounds); |
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 // Switch to overview mode. | 1230 // Switch to overview mode. |
1231 ToggleOverview(); | 1231 ToggleOverview(); |
1232 ASSERT_TRUE(IsSelecting()); | 1232 ASSERT_TRUE(IsSelecting()); |
1233 | 1233 |
1234 // Tap should now exit overview mode. | 1234 // Tap should now exit overview mode. |
1235 generator.GestureTapAt(point_in_background_page); | 1235 generator.GestureTapAt(point_in_background_page); |
1236 EXPECT_FALSE(IsSelecting()); | 1236 EXPECT_FALSE(IsSelecting()); |
1237 } | 1237 } |
1238 | 1238 |
1239 } // namespace ash | 1239 } // namespace ash |
OLD | NEW |