Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: ui/views/controls/menu/menu_controller_win.cc

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_controller_aura.cc ('k') | ui/views/controls/menu/native_menu_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698