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_RUNNER_IMPL_INTERFACE_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ |
6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "ui/views/controls/menu/menu_runner.h" | 11 #include "ui/views/controls/menu/menu_runner.h" |
12 | 12 |
13 namespace views { | 13 namespace views { |
14 | 14 |
15 class MenuItemView; | |
16 | |
17 namespace internal { | 15 namespace internal { |
18 | 16 |
19 // An abstract interface for menu runner implementations. | 17 // An abstract interface for menu runner implementations. |
20 // Invoke Release() to destroy. Release() deletes immediately if the menu isn't | 18 // Invoke Release() to destroy. Release() deletes immediately if the menu isn't |
21 // showing. If the menu is showing Release() cancels the menu and when the | 19 // showing. If the menu is showing Release() cancels the menu and when the |
22 // nested RunMenuAt() call returns deletes itself and the menu. | 20 // nested RunMenuAt() call returns deletes itself and the menu. |
23 class MenuRunnerImplInterface { | 21 class MenuRunnerImplInterface { |
24 public: | 22 public: |
25 // Creates a concrete instance for running |menu_model|. | 23 // Creates a concrete instance for running |menu_model|. |
26 // |run_types| is a bitmask of MenuRunner::RunTypes. | 24 // |run_types| is a bitmask of MenuRunner::RunTypes. |
(...skipping 24 matching lines...) Expand all Loading... |
51 | 49 |
52 protected: | 50 protected: |
53 // Call Release() to delete. | 51 // Call Release() to delete. |
54 virtual ~MenuRunnerImplInterface() {} | 52 virtual ~MenuRunnerImplInterface() {} |
55 }; | 53 }; |
56 | 54 |
57 } // namespace internal | 55 } // namespace internal |
58 } // namespace views | 56 } // namespace views |
59 | 57 |
60 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ | 58 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_INTERFACE_H_ |
OLD | NEW |