| 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 "ui/views/controls/menu/menu_runner_impl_interface.h" | 8 #include "ui/views/controls/menu/menu_runner_impl_interface.h" |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // protected and we're a friend. | 62 // protected and we're a friend. |
| 63 MenuItemView* menu_; | 63 MenuItemView* menu_; |
| 64 | 64 |
| 65 // Any sibling menus. Does not include |menu_|. We own these too. | 65 // Any sibling menus. Does not include |menu_|. We own these too. |
| 66 std::set<MenuItemView*> sibling_menus_; | 66 std::set<MenuItemView*> sibling_menus_; |
| 67 | 67 |
| 68 // Created and set as the delegate of the MenuItemView if Release() is | 68 // Created and set as the delegate of the MenuItemView if Release() is |
| 69 // invoked. This is done to make sure the delegate isn't notified after | 69 // invoked. This is done to make sure the delegate isn't notified after |
| 70 // Release() is invoked. We do this as we assume the delegate is no longer | 70 // Release() is invoked. We do this as we assume the delegate is no longer |
| 71 // valid if MenuRunner has been deleted. | 71 // valid if MenuRunner has been deleted. |
| 72 scoped_ptr<MenuDelegate> empty_delegate_; | 72 std::unique_ptr<MenuDelegate> empty_delegate_; |
| 73 | 73 |
| 74 // Are we in run waiting for it to return? | 74 // Are we in run waiting for it to return? |
| 75 bool running_; | 75 bool running_; |
| 76 | 76 |
| 77 // Set if |running_| and Release() has been invoked. | 77 // Set if |running_| and Release() has been invoked. |
| 78 bool delete_after_run_; | 78 bool delete_after_run_; |
| 79 | 79 |
| 80 // Are we running asynchronously? | 80 // Are we running asynchronously? |
| 81 bool async_; | 81 bool async_; |
| 82 | 82 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 95 // Used to detect deletion of |this| when notifying delegate of success. | 95 // Used to detect deletion of |this| when notifying delegate of success. |
| 96 base::WeakPtrFactory<MenuRunnerImpl> weak_factory_; | 96 base::WeakPtrFactory<MenuRunnerImpl> weak_factory_; |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImpl); | 98 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImpl); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace internal | 101 } // namespace internal |
| 102 } // namespace views | 102 } // namespace views |
| 103 | 103 |
| 104 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_H_ | 104 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_H_ |
| OLD | NEW |