| 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_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Release() is invoked. We do this as we assume the delegate is no longer | 80 // Release() is invoked. We do this as we assume the delegate is no longer |
| 81 // valid if MenuRunner has been deleted. | 81 // valid if MenuRunner has been deleted. |
| 82 std::unique_ptr<MenuDelegate> empty_delegate_; | 82 std::unique_ptr<MenuDelegate> empty_delegate_; |
| 83 | 83 |
| 84 // Are we in run waiting for it to return? | 84 // Are we in run waiting for it to return? |
| 85 bool running_; | 85 bool running_; |
| 86 | 86 |
| 87 // Set if |running_| and Release() has been invoked. | 87 // Set if |running_| and Release() has been invoked. |
| 88 bool delete_after_run_; | 88 bool delete_after_run_; |
| 89 | 89 |
| 90 // Are we running asynchronously? | |
| 91 bool async_; | |
| 92 | |
| 93 // Are we running for a drop? | 90 // Are we running for a drop? |
| 94 bool for_drop_; | 91 bool for_drop_; |
| 95 | 92 |
| 96 // The controller. | 93 // The controller. |
| 97 base::WeakPtr<MenuController> controller_; | 94 base::WeakPtr<MenuController> controller_; |
| 98 | 95 |
| 99 // Do we own the controller? | 96 // Do we own the controller? |
| 100 bool owns_controller_; | 97 bool owns_controller_; |
| 101 | 98 |
| 102 // The timestamp of the event which closed the menu - or 0. | 99 // The timestamp of the event which closed the menu - or 0. |
| 103 base::TimeTicks closing_event_time_; | 100 base::TimeTicks closing_event_time_; |
| 104 | 101 |
| 105 // Used to detect deletion of |this| when notifying delegate of success. | 102 // Used to detect deletion of |this| when notifying delegate of success. |
| 106 base::WeakPtrFactory<MenuRunnerImpl> weak_factory_; | 103 base::WeakPtrFactory<MenuRunnerImpl> weak_factory_; |
| 107 | 104 |
| 108 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImpl); | 105 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImpl); |
| 109 }; | 106 }; |
| 110 | 107 |
| 111 } // namespace internal | 108 } // namespace internal |
| 112 } // namespace views | 109 } // namespace views |
| 113 | 110 |
| 114 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_H_ | 111 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_H_ |
| OLD | NEW |