| OLD | NEW |
| 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 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // Create a platform specific instance. | 29 // Create a platform specific instance. |
| 30 static MenuMessageLoop* Create(); | 30 static MenuMessageLoop* Create(); |
| 31 | 31 |
| 32 // Repost |event| to |window|. | 32 // Repost |event| to |window|. |
| 33 // |screen_loc| is the event's location in screen coordinates. | 33 // |screen_loc| is the event's location in screen coordinates. |
| 34 static void RepostEventToWindow(const ui::LocatedEvent* event, | 34 static void RepostEventToWindow(const ui::LocatedEvent* event, |
| 35 gfx::NativeWindow window, | 35 gfx::NativeWindow window, |
| 36 const gfx::Point& screen_loc); | 36 const gfx::Point& screen_loc); |
| 37 | 37 |
| 38 // Runs the platform specific bits of the message loop. If |nested_menu| is | 38 // Runs the platform specific bits of the message loop. |
| 39 // true we're being asked to run a menu from within a menu (eg a context | 39 virtual void Run() = 0; |
| 40 // menu). | |
| 41 virtual void Run(MenuController*, Widget* owner, bool nested_menu) = 0; | |
| 42 | 40 |
| 43 // Quit an earlier call to Run(). | 41 // Quit an earlier call to Run(). |
| 44 virtual void QuitNow() = 0; | 42 virtual void QuitNow() = 0; |
| 45 | |
| 46 // Clear any references to the owner widget that was passed into the previous | |
| 47 // call to Run(). | |
| 48 virtual void ClearOwner() = 0; | |
| 49 }; | 43 }; |
| 50 | 44 |
| 51 } // namespace views | 45 } // namespace views |
| 52 | 46 |
| 53 #endif // UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_ | 47 #endif // UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_ |
| OLD | NEW |