| Index: ui/views/controls/menu/menu_controller.h
|
| diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
|
| index 697e9a5781f25efd1c917c02607a39967087a4fd..1c5fb326d08acc69c1efdb356e25e65a7aa2cb6e 100644
|
| --- a/ui/views/controls/menu/menu_controller.h
|
| +++ b/ui/views/controls/menu/menu_controller.h
|
| @@ -606,7 +606,8 @@ class VIEWS_EXPORT MenuController
|
| // When Run is invoked during an active Run, it may be called from a separate
|
| // MenuControllerDelegate. If not empty is means we are nested, and the
|
| // stacked delegates should be notified instead of |delegate_|.
|
| - typedef std::pair<internal::MenuControllerDelegate*, bool> NestedDelegate;
|
| + typedef std::pair<base::WeakPtr<internal::MenuControllerDelegate>, bool>
|
| + NestedDelegate;
|
| std::list<NestedDelegate> delegate_stack_;
|
|
|
| // As the mouse moves around submenus are not opened immediately. Instead
|
| @@ -664,7 +665,7 @@ class VIEWS_EXPORT MenuController
|
| // Current hot tracked child button if any.
|
| CustomButton* hot_button_;
|
|
|
| - internal::MenuControllerDelegate* delegate_;
|
| + base::WeakPtr<internal::MenuControllerDelegate> delegate_;
|
|
|
| // How deep we are in nested message loops. This should be at most 2 (when
|
| // showing a context menu from a menu).
|
|
|