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

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

Issue 2155243007: Turn Bookmark Menus Async (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge the pretarget handlers Created 4 years, 4 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
OLDNEW
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_message_loop_mac.h" 5 #include "ui/views/controls/menu/menu_message_loop_mac.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 10 matching lines...) Expand all
21 void MenuMessageLoop::RepostEventToWindow(const ui::LocatedEvent* event, 21 void MenuMessageLoop::RepostEventToWindow(const ui::LocatedEvent* event,
22 gfx::NativeWindow window, 22 gfx::NativeWindow window,
23 const gfx::Point& screen_loc) { 23 const gfx::Point& screen_loc) {
24 NOTIMPLEMENTED(); 24 NOTIMPLEMENTED();
25 } 25 }
26 26
27 MenuMessageLoopMac::MenuMessageLoopMac() {} 27 MenuMessageLoopMac::MenuMessageLoopMac() {}
28 28
29 MenuMessageLoopMac::~MenuMessageLoopMac() {} 29 MenuMessageLoopMac::~MenuMessageLoopMac() {}
30 30
31 void MenuMessageLoopMac::Run(MenuController* controller, 31 void MenuMessageLoopMac::Run() {
32 Widget* owner,
33 bool nested_menu) {
34 base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); 32 base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
35 base::MessageLoop::ScopedNestableTaskAllower allow(loop); 33 base::MessageLoop::ScopedNestableTaskAllower allow(loop);
36 base::RunLoop run_loop; 34 base::RunLoop run_loop;
37 base::AutoReset<base::RunLoop*> reset_run_loop(&run_loop_, &run_loop); 35 base::AutoReset<base::RunLoop*> reset_run_loop(&run_loop_, &run_loop);
38 run_loop.Run(); 36 run_loop.Run();
39 } 37 }
40 38
41 void MenuMessageLoopMac::QuitNow() { 39 void MenuMessageLoopMac::QuitNow() {
42 DCHECK(run_loop_); 40 DCHECK(run_loop_);
43 run_loop_->Quit(); 41 run_loop_->Quit();
44 } 42 }
45 43
46 void MenuMessageLoopMac::ClearOwner() {
47 }
48
49 } // namespace views 44 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_message_loop_mac.h ('k') | ui/views/controls/menu/menu_pre_target_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698