OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/views/controls/menu/menu_message_loop_mac.h" |
| 6 |
| 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/run_loop.h" |
| 9 |
| 10 namespace views { |
| 11 |
| 12 // static |
| 13 MenuMessageLoop* MenuMessageLoop::Create() { |
| 14 return new MenuMessageLoopMac; |
| 15 } |
| 16 |
| 17 void MenuMessageLoopMac::RepostEventToWindow(const ui::LocatedEvent& event, |
| 18 gfx::NativeWindow window, |
| 19 gfx::Point screen_loc) OVERRIDE; |
| 20 NOTIMPLEMENTED(); |
| 21 } |
| 22 |
| 23 void MenuMessageLoopMac::Run(MenuController* controller, bool nested_menu) { |
| 24 base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); |
| 25 base::MessageLoop::ScopedNestableTaskAllower allow(loop); |
| 26 base::RunLoop run_loop; |
| 27 run_loop.Run(); |
| 28 } |
| 29 |
| 30 bool MenuMessageLoopMac::ShouldQuitNow() const { |
| 31 return true; |
| 32 } |
| 33 |
| 34 void MenuMessageLoopMac::QuitNow() { |
| 35 base::MessageLoop::current()->QuitNow(); |
| 36 } |
| 37 |
| 38 } // namespace views |
OLD | NEW |