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

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

Issue 267593005: Refactor menu controller to isolate aura dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes for sky Created 6 years, 7 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
(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/logging.h"
8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h"
10 #include "ui/gfx/geometry/point.h"
11
12 namespace views {
13
14 // static
15 MenuMessageLoop* MenuMessageLoop::Create() {
16 return new MenuMessageLoopMac;
17 }
18
19 MenuMessageLoopMac::MenuMessageLoopMac() {
20 }
21
22 MenuMessageLoopMac::~MenuMessageLoopMac() {
23 }
24
25 void MenuMessageLoopMac::RepostEventToWindow(const ui::LocatedEvent& event,
26 gfx::NativeWindow window,
27 const gfx::Point& screen_loc) {
28 NOTIMPLEMENTED();
29 }
30
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();
38 }
39
40 bool MenuMessageLoopMac::ShouldQuitNow() const {
41 return true;
42 }
43
44 void MenuMessageLoopMac::QuitNow() {
45 base::MessageLoop::current()->QuitNow();
46 }
47
48 void MenuMessageLoopMac::ClearOwner() {
49 }
50
51 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_message_loop_mac.h ('k') | ui/views/controls/menu/menu_scroll_view_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698