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

Side by Side Diff: ui/app_list/views/contents_switcher_view.h

Issue 392133002: Remove Layout code from ContentsSwitcherView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@land_return_to_page
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | ui/app_list/views/contents_switcher_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_APP_LIST_VIEWS_CONTENTS_SWITCHER_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_CONTENTS_SWITCHER_VIEW_H_
6 #define UI_APP_LIST_VIEWS_CONTENTS_SWITCHER_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_CONTENTS_SWITCHER_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ui/app_list/pagination_model_observer.h" 9 #include "ui/app_list/pagination_model_observer.h"
10 #include "ui/views/controls/button/button.h" 10 #include "ui/views/controls/button/button.h"
(...skipping 13 matching lines...) Expand all
24 virtual ~ContentsSwitcherView(); 24 virtual ~ContentsSwitcherView();
25 25
26 ContentsView* contents_view() const { return contents_view_; } 26 ContentsView* contents_view() const { return contents_view_; }
27 27
28 // Adds a switcher button using |resource_id| as the button's image, which 28 // Adds a switcher button using |resource_id| as the button's image, which
29 // opens the page with index |page_index| in the ContentsView. |resource_id| 29 // opens the page with index |page_index| in the ContentsView. |resource_id|
30 // is ignored if it is 0. 30 // is ignored if it is 0.
31 void AddSwitcherButton(int resource_id, int page_index); 31 void AddSwitcherButton(int resource_id, int page_index);
32 32
33 private: 33 private:
34 // Overridden from views::View:
35 virtual gfx::Size GetPreferredSize() const OVERRIDE;
36 virtual void Layout() OVERRIDE;
37
38 // Overridden from views::ButtonListener: 34 // Overridden from views::ButtonListener:
39 virtual void ButtonPressed(views::Button* sender, 35 virtual void ButtonPressed(views::Button* sender,
40 const ui::Event& event) OVERRIDE; 36 const ui::Event& event) OVERRIDE;
41 37
42 // Overridden from PaginationModelObserver: 38 // Overridden from PaginationModelObserver:
43 virtual void TotalPagesChanged() OVERRIDE; 39 virtual void TotalPagesChanged() OVERRIDE;
44 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; 40 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE;
45 virtual void TransitionStarted() OVERRIDE; 41 virtual void TransitionStarted() OVERRIDE;
46 virtual void TransitionChanged() OVERRIDE; 42 virtual void TransitionChanged() OVERRIDE;
47 43
48 ContentsView* contents_view_; // Owned by views hierarchy. 44 ContentsView* contents_view_; // Owned by views hierarchy.
49 views::View* buttons_; // Owned by views hierarchy. 45
50 // Stores Views owned by views hierarchy. 46 // Stores Views owned by views hierarchy.
51 std::vector<views::View*> page_active_indicators_; 47 std::vector<views::View*> page_active_indicators_;
52 48
53 DISALLOW_COPY_AND_ASSIGN(ContentsSwitcherView); 49 DISALLOW_COPY_AND_ASSIGN(ContentsSwitcherView);
54 }; 50 };
55 51
56 } // namespace app_list 52 } // namespace app_list
57 53
58 #endif // UI_APP_LIST_VIEWS_CONTENTS_SWITCHER_VIEW_H_ 54 #endif // UI_APP_LIST_VIEWS_CONTENTS_SWITCHER_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/views/contents_switcher_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698