| 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_AURA_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_AURA_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_AURA_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_AURA_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "ui/views/controls/menu/menu_message_loop.h" | 13 #include "ui/views/controls/menu/menu_message_loop.h" |
| 14 | 14 |
| 15 namespace ui { | 15 namespace ui { |
| 16 class ScopedEventDispatcher; | 16 class ScopedEventDispatcher; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace views { | 19 namespace views { |
| 20 | 20 |
| 21 class MenuMessageLoopAura : public MenuMessageLoop { | 21 class MenuMessageLoopAura : public MenuMessageLoop { |
| 22 public: | 22 public: |
| 23 MenuMessageLoopAura(); | 23 MenuMessageLoopAura(); |
| 24 ~MenuMessageLoopAura() override; | 24 ~MenuMessageLoopAura() override; |
| 25 | 25 |
| 26 // Overridden from MenuMessageLoop: | 26 // MenuMessageLoop: |
| 27 void Run(MenuController* controller, | 27 void Run() override; |
| 28 Widget* owner, | |
| 29 bool nested_menu) override; | |
| 30 void QuitNow() override; | 28 void QuitNow() override; |
| 31 void ClearOwner() override; | |
| 32 | 29 |
| 33 private: | 30 private: |
| 34 // Owner of child windows. | |
| 35 // WARNING: this may be NULL. | |
| 36 Widget* owner_; | |
| 37 | |
| 38 base::Closure message_loop_quit_; | 31 base::Closure message_loop_quit_; |
| 39 | 32 |
| 40 DISALLOW_COPY_AND_ASSIGN(MenuMessageLoopAura); | 33 DISALLOW_COPY_AND_ASSIGN(MenuMessageLoopAura); |
| 41 }; | 34 }; |
| 42 | 35 |
| 43 } // namespace views | 36 } // namespace views |
| 44 | 37 |
| 45 #endif // UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_AURA_H_ | 38 #endif // UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_AURA_H_ |
| OLD | NEW |