Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_HOST_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
| 13 #include "ui/views/controls/menu/menu_controller.h" | |
| 13 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
| 14 | 15 |
| 15 namespace views { | 16 namespace views { |
| 16 | 17 |
| 17 class SubmenuView; | 18 class SubmenuView; |
| 18 class View; | 19 class View; |
| 19 class Widget; | 20 class Widget; |
| 20 | 21 |
| 21 namespace internal { | 22 namespace internal { |
| 22 | 23 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 friend class test::MenuControllerTest; | 72 friend class test::MenuControllerTest; |
| 72 | 73 |
| 73 // Overridden from Widget: | 74 // Overridden from Widget: |
| 74 internal::RootView* CreateRootView() override; | 75 internal::RootView* CreateRootView() override; |
| 75 void OnMouseCaptureLost() override; | 76 void OnMouseCaptureLost() override; |
| 76 void OnNativeWidgetDestroyed() override; | 77 void OnNativeWidgetDestroyed() override; |
| 77 void OnOwnerClosing() override; | 78 void OnOwnerClosing() override; |
| 78 void OnDragWillStart() override; | 79 void OnDragWillStart() override; |
| 79 void OnDragComplete() override; | 80 void OnDragComplete() override; |
| 80 | 81 |
| 82 #if defined(OS_CHROMEOS) | |
| 83 // Current active MenuController instance. | |
| 84 MenuController* controller = MenuController::GetActiveInstance(); | |
|
xiyuan
2017/05/16 22:46:57
This is not needed and should not be done here.
W
minch1
2017/05/17 16:55:38
Done.
| |
| 85 | |
| 86 // The owner of child windows. | |
|
xiyuan
2017/05/16 22:46:57
This not exactly correct. It is "parent of the Men
minch1
2017/05/17 16:55:38
Done.
| |
| 87 Widget* owner_ = nullptr; | |
| 88 #endif | |
| 89 | |
| 81 // The view we contain. | 90 // The view we contain. |
| 82 SubmenuView* submenu_; | 91 SubmenuView* submenu_; |
| 83 | 92 |
| 84 // If true, DestroyMenuHost has been invoked. | 93 // If true, DestroyMenuHost has been invoked. |
| 85 bool destroying_; | 94 bool destroying_; |
| 86 | 95 |
| 87 // If true and capture is lost we don't notify the delegate. | 96 // If true and capture is lost we don't notify the delegate. |
| 88 bool ignore_capture_lost_; | 97 bool ignore_capture_lost_; |
| 89 | 98 |
| 90 #if !defined(OS_MACOSX) | 99 #if !defined(OS_MACOSX) |
| 91 // Handles raw touch events at the moment. | 100 // Handles raw touch events at the moment. |
| 92 std::unique_ptr<internal::PreMenuEventDispatchHandler> pre_dispatch_handler_; | 101 std::unique_ptr<internal::PreMenuEventDispatchHandler> pre_dispatch_handler_; |
| 93 #endif | 102 #endif |
| 94 | 103 |
| 95 DISALLOW_COPY_AND_ASSIGN(MenuHost); | 104 DISALLOW_COPY_AND_ASSIGN(MenuHost); |
| 96 }; | 105 }; |
| 97 | 106 |
| 98 } // namespace views | 107 } // namespace views |
| 99 | 108 |
| 100 #endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ | 109 #endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ |
| OLD | NEW |