[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / ui / views / controls / menu / menu_message_loop_mac.cc
blobb1c10cca7d86bec332ac9c0a8e3d97f76cdf0f29
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.
5 #include "ui/views/controls/menu/menu_message_loop_mac.h"
7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h"
10 #include "ui/gfx/geometry/point.h"
12 namespace views {
14 // static
15 MenuMessageLoop* MenuMessageLoop::Create() {
16 return new MenuMessageLoopMac;
19 MenuMessageLoopMac::MenuMessageLoopMac() {
22 MenuMessageLoopMac::~MenuMessageLoopMac() {
25 void MenuMessageLoopMac::RepostEventToWindow(const ui::LocatedEvent& event,
26 gfx::NativeWindow window,
27 const gfx::Point& screen_loc) {
28 NOTIMPLEMENTED();
31 void MenuMessageLoopMac::Run(MenuController* controller,
32 Widget* owner,
33 bool nested_menu) {
34 base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
35 base::MessageLoop::ScopedNestableTaskAllower allow(loop);
36 base::RunLoop run_loop;
37 run_loop.Run();
40 bool MenuMessageLoopMac::ShouldQuitNow() const {
41 return true;
44 void MenuMessageLoopMac::QuitNow() {
45 base::MessageLoop::current()->QuitNow();
48 void MenuMessageLoopMac::ClearOwner() {
51 } // namespace views