Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: ui/views/controls/menu/menu_runner_impl.h

Issue 2659903002: Change MenuControllerDelegate to provide WeakPtr (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // The controller. 88 // The controller.
89 base::WeakPtr<MenuController> controller_; 89 base::WeakPtr<MenuController> controller_;
90 90
91 // Do we own the controller? 91 // Do we own the controller?
92 bool owns_controller_; 92 bool owns_controller_;
93 93
94 // The timestamp of the event which closed the menu - or 0. 94 // The timestamp of the event which closed the menu - or 0.
95 base::TimeTicks closing_event_time_; 95 base::TimeTicks closing_event_time_;
96 96
97 // Used to detect deletion of |this| when notifying delegate of success.
98 base::WeakPtrFactory<MenuRunnerImpl> weak_factory_;
99
100 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImpl); 97 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImpl);
101 }; 98 };
102 99
103 } // namespace internal 100 } // namespace internal
104 } // namespace views 101 } // namespace views
105 102
106 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_H_ 103 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_controller_unittest.cc ('k') | ui/views/controls/menu/menu_runner_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698