OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/views/controls/menu/menu_controller.h" | 5 #include "ui/views/controls/menu/menu_controller.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 } | 146 } |
147 | 147 |
148 int outstanding_touches() const { return outstanding_touches_; } | 148 int outstanding_touches() const { return outstanding_touches_; } |
149 | 149 |
150 private: | 150 private: |
151 int outstanding_touches_; | 151 int outstanding_touches_; |
152 DISALLOW_COPY_AND_ASSIGN(TestEventHandler); | 152 DISALLOW_COPY_AND_ASSIGN(TestEventHandler); |
153 }; | 153 }; |
154 | 154 |
155 #if defined(USE_AURA) | 155 #if defined(USE_AURA) |
156 // A DragDropClient which does not trigger a nested message loop. Instead a | 156 // A DragDropClient which does not trigger a nested run loop. Instead a |
157 // callback is triggered during StartDragAndDrop in order to allow testing. | 157 // callback is triggered during StartDragAndDrop in order to allow testing. |
158 class TestDragDropClient : public aura::client::DragDropClient { | 158 class TestDragDropClient : public aura::client::DragDropClient { |
159 public: | 159 public: |
160 explicit TestDragDropClient(const base::Closure& callback) | 160 explicit TestDragDropClient(const base::Closure& callback) |
161 : start_drag_and_drop_callback_(callback), drag_in_progress_(false) {} | 161 : start_drag_and_drop_callback_(callback), drag_in_progress_(false) {} |
162 ~TestDragDropClient() override {} | 162 ~TestDragDropClient() override {} |
163 | 163 |
164 // aura::client::DragDropClient: | 164 // aura::client::DragDropClient: |
165 int StartDragAndDrop(const ui::OSExchangeData& data, | 165 int StartDragAndDrop(const ui::OSExchangeData& data, |
166 aura::Window* root_window, | 166 aura::Window* root_window, |
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1413 // crash. | 1413 // crash. |
1414 TestAsyncEscapeKey(); | 1414 TestAsyncEscapeKey(); |
1415 EXPECT_EQ(nested_controller_delegate_2->on_menu_closed_called(), 1); | 1415 EXPECT_EQ(nested_controller_delegate_2->on_menu_closed_called(), 1); |
1416 EXPECT_EQ(menu_controller_delegate(), GetCurrentDelegate()); | 1416 EXPECT_EQ(menu_controller_delegate(), GetCurrentDelegate()); |
1417 } | 1417 } |
1418 | 1418 |
1419 #endif // defined(USE_AURA) | 1419 #endif // defined(USE_AURA) |
1420 | 1420 |
1421 } // namespace test | 1421 } // namespace test |
1422 } // namespace views | 1422 } // namespace views |
OLD | NEW |