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

Unified Diff: chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h

Issue 542493002: Cleanup BrowserActionsContainer a bit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +DCHECK Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h
diff --git a/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h b/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h
index 2744891a082b4e53ec0ca45fed18c89bdac48fee..069bcf5729da8c9acdb5945d4e20d679b1ac1d1f 100644
--- a/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h
+++ b/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.h
@@ -17,7 +17,6 @@
class Browser;
class BrowserActionsContainer;
class BrowserActionView;
-
class IconUpdater;
namespace views {
@@ -89,10 +88,8 @@ class BrowserActionOverflowMenuController : public views::MenuDelegate {
// This class manages its own lifetime.
virtual ~BrowserActionOverflowMenuController();
- // Converts a menu item |id| into a BrowserActionView by adding the |id| value
- // to the number of visible views (according to the container owner). If
- // |index| is specified, it will point to the absolute index of the view.
- BrowserActionView* ViewForId(int id, size_t* index);
+ // Returns the offset into |views_| for the given |id|.
+ size_t IndexForId(int id) const;
// A pointer to the browser action container that owns the overflow menu.
BrowserActionsContainer* owner_;
@@ -113,7 +110,8 @@ class BrowserActionOverflowMenuController : public views::MenuDelegate {
// The views vector of all the browser actions the container knows about. We
// won't show all items, just the one starting at |start_index| and above.
- const std::vector<BrowserActionView*>* views_;
+ // Owned by |owner_|.
+ const std::vector<BrowserActionView*>& views_;
// The index into the BrowserActionView vector, indicating where to start
// picking browser actions to draw.
« no previous file with comments | « no previous file | chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698