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

Unified Diff: ui/app_list/views/contents_switcher_view.h

Issue 336313010: App List: Refactor ContentsSwitcherView so it doesn't hard-code pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
Index: ui/app_list/views/contents_switcher_view.h
diff --git a/ui/app_list/views/contents_switcher_view.h b/ui/app_list/views/contents_switcher_view.h
index 338a36acea9bc62a0c14f442ce6a0f656ff98164..7153cec81ca644eaf1ab9603eb08489f5ef58433 100644
--- a/ui/app_list/views/contents_switcher_view.h
+++ b/ui/app_list/views/contents_switcher_view.h
@@ -17,16 +17,20 @@ class ContentsView;
// ContentsView.
class ContentsSwitcherView : public views::View, public views::ButtonListener {
public:
- explicit ContentsSwitcherView(ContentsView* contents_view);
+ explicit ContentsSwitcherView();
virtual ~ContentsSwitcherView();
ContentsView* contents_view() const { return contents_view_; }
- private:
- // Adds a switcher button using |resource_id| as the button's image and |tag|
- // as the button's id.
- void AddSwitcherButton(int resource_id, int tag);
+ // Initialize the ContentsSwitcherView with a ContentsView sibling. Must be
+ // called before AddSwitcherButton.
+ void Init(ContentsView* contents_view);
+
+ // Adds a switcher button using |resource_id| as the button's image, which
+ // opens the page with index |page_index| in the ContentsView.
+ void AddSwitcherButton(int resource_id, int page_index);
calamity 2014/06/18 05:22:29 Add a note about resource_id of 0 being ignored.
Matt Giuca 2014/06/18 06:47:02 Done.
+ private:
// Overridden from views::View:
virtual gfx::Size GetPreferredSize() const OVERRIDE;
virtual void Layout() OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698