| 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" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 friend class test::MenuControllerTest; | 71 friend class test::MenuControllerTest; |
| 72 | 72 |
| 73 // Overridden from Widget: | 73 // Overridden from Widget: |
| 74 internal::RootView* CreateRootView() override; | 74 internal::RootView* CreateRootView() override; |
| 75 void OnMouseCaptureLost() override; | 75 void OnMouseCaptureLost() override; |
| 76 void OnNativeWidgetDestroyed() override; | 76 void OnNativeWidgetDestroyed() override; |
| 77 void OnOwnerClosing() override; | 77 void OnOwnerClosing() override; |
| 78 void OnDragWillStart() override; | 78 void OnDragWillStart() override; |
| 79 void OnDragComplete() override; | 79 void OnDragComplete() override; |
| 80 | 80 |
| 81 // Parent of the MenuHost widget. |
| 82 Widget* owner_ = nullptr; |
| 83 |
| 81 // The view we contain. | 84 // The view we contain. |
| 82 SubmenuView* submenu_; | 85 SubmenuView* submenu_; |
| 83 | 86 |
| 84 // If true, DestroyMenuHost has been invoked. | 87 // If true, DestroyMenuHost has been invoked. |
| 85 bool destroying_; | 88 bool destroying_; |
| 86 | 89 |
| 87 // If true and capture is lost we don't notify the delegate. | 90 // If true and capture is lost we don't notify the delegate. |
| 88 bool ignore_capture_lost_; | 91 bool ignore_capture_lost_; |
| 89 | 92 |
| 90 #if !defined(OS_MACOSX) | 93 #if !defined(OS_MACOSX) |
| 91 // Handles raw touch events at the moment. | 94 // Handles raw touch events at the moment. |
| 92 std::unique_ptr<internal::PreMenuEventDispatchHandler> pre_dispatch_handler_; | 95 std::unique_ptr<internal::PreMenuEventDispatchHandler> pre_dispatch_handler_; |
| 93 #endif | 96 #endif |
| 94 | 97 |
| 95 DISALLOW_COPY_AND_ASSIGN(MenuHost); | 98 DISALLOW_COPY_AND_ASSIGN(MenuHost); |
| 96 }; | 99 }; |
| 97 | 100 |
| 98 } // namespace views | 101 } // namespace views |
| 99 | 102 |
| 100 #endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ | 103 #endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_ |
| OLD | NEW |