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

Side by Side Diff: ui/views/controls/menu/menu_message_loop.h

Issue 2772863002: Delete MenuController Nested Message Loop (Closed)
Patch Set: remove another async flag Created 3 years, 9 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
(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 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_
7
8 #include "ui/gfx/native_widget_types.h"
9
10 namespace gfx {
11 class Point;
12 }
13
14 namespace ui {
15 class LocatedEvent;
16 }
17
18 namespace views {
19
20 class MenuController;
21
22 // Interface used by MenuController to run a nested message loop while
23 // showing a menu, allowing for platform specific implementations.
24 class MenuMessageLoop {
25 public:
26 virtual ~MenuMessageLoop() {}
27
28 // Create a platform specific instance.
29 static MenuMessageLoop* Create();
30
31 // Repost |event| to |window|.
32 // |screen_loc| is the event's location in screen coordinates.
33 static void RepostEventToWindow(const ui::LocatedEvent* event,
34 gfx::NativeWindow window,
35 const gfx::Point& screen_loc);
36
37 // Runs the platform specific bits of the message loop.
38 virtual void Run() = 0;
39
40 // Quit an earlier call to Run().
41 virtual void QuitNow() = 0;
42 };
43
44 } // namespace views
45
46 #endif // UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_controller_unittest.cc ('k') | ui/views/controls/menu/menu_message_loop_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698