| 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_ADAPTER_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_ADAPTER_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_ADAPTER_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/views/controls/menu/menu_runner_impl_interface.h" | 11 #include "ui/views/controls/menu/menu_runner_impl_interface.h" |
| 12 #include "ui/views/views_export.h" | 12 #include "ui/views/views_export.h" |
| 13 | 13 |
| 14 namespace views { | 14 namespace views { |
| 15 |
| 16 class MenuModelAdapter; |
| 17 |
| 15 namespace internal { | 18 namespace internal { |
| 16 | 19 |
| 17 class MenuRunnerImpl; | 20 class MenuRunnerImpl; |
| 18 | 21 |
| 19 // Given a MenuModel, adapts MenuRunnerImpl which expects a MenuItemView. | 22 // Given a MenuModel, adapts MenuRunnerImpl which expects a MenuItemView. |
| 20 class VIEWS_EXPORT MenuRunnerImplAdapter | 23 class VIEWS_EXPORT MenuRunnerImplAdapter |
| 21 : public NON_EXPORTED_BASE(MenuRunnerImplInterface) { | 24 : public NON_EXPORTED_BASE(MenuRunnerImplInterface) { |
| 22 public: | 25 public: |
| 23 MenuRunnerImplAdapter(ui::MenuModel* menu_model, | 26 MenuRunnerImplAdapter(ui::MenuModel* menu_model, |
| 24 const base::Closure& on_menu_closed_callback); | 27 const base::Closure& on_menu_closed_callback); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 40 std::unique_ptr<MenuModelAdapter> menu_model_adapter_; | 43 std::unique_ptr<MenuModelAdapter> menu_model_adapter_; |
| 41 MenuRunnerImpl* impl_; | 44 MenuRunnerImpl* impl_; |
| 42 | 45 |
| 43 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImplAdapter); | 46 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImplAdapter); |
| 44 }; | 47 }; |
| 45 | 48 |
| 46 } // namespace internal | 49 } // namespace internal |
| 47 } // namespace views | 50 } // namespace views |
| 48 | 51 |
| 49 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_ADAPTER_H_ | 52 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_ADAPTER_H_ |
| OLD | NEW |