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 "ui/views/controls/menu/menu_controller.h" | 5 #include "ui/views/controls/menu/menu_controller.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "ui/gfx/screen.h" | 8 #include "ui/gfx/screen.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
11 | 11 |
12 void MenuController::RunMessageLoop(bool nested_menu) { | 12 void MenuController::RunMessageLoop(bool nested_menu) { |
13 MessageLoopForUI* loop = MessageLoopForUI::current(); | 13 base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); |
14 MessageLoop::ScopedNestableTaskAllower allow(loop); | 14 base::MessageLoop::ScopedNestableTaskAllower allow(loop); |
15 base::RunLoop run_loop(this); | 15 base::RunLoop run_loop(this); |
16 run_loop.Run(); | 16 run_loop.Run(); |
17 } | 17 } |
18 | 18 |
19 bool MenuController::ShouldQuitNow() const { | 19 bool MenuController::ShouldQuitNow() const { |
20 return true; | 20 return true; |
21 } | 21 } |
22 | 22 |
23 gfx::Screen* MenuController::GetScreen() { | 23 gfx::Screen* MenuController::GetScreen() { |
24 return gfx::Screen::GetNativeScreen(); | 24 return gfx::Screen::GetNativeScreen(); |
25 } | 25 } |
26 | 26 |
27 } // namespace views | 27 } // namespace views |
OLD | NEW |