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

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

Issue 380613002: Experimental app list: Added a current page indicator to the launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed static initializer. 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 | « ui/app_list/views/contents_switcher_view.cc ('k') | ui/app_list/views/contents_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
6 #define UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void InitNamedPages(AppListModel* model, AppListViewDelegate* view_delegate); 58 void InitNamedPages(AppListModel* model, AppListViewDelegate* view_delegate);
59 59
60 // The app list gets closed and drag and drop operations need to be cancelled. 60 // The app list gets closed and drag and drop operations need to be cancelled.
61 void CancelDrag(); 61 void CancelDrag();
62 62
63 // If |drag_and_drop| is not NULL it will be called upon drag and drop 63 // If |drag_and_drop| is not NULL it will be called upon drag and drop
64 // operations outside the application list. 64 // operations outside the application list.
65 void SetDragAndDropHostOfCurrentAppList( 65 void SetDragAndDropHostOfCurrentAppList(
66 ApplicationDragAndDropHost* drag_and_drop_host); 66 ApplicationDragAndDropHost* drag_and_drop_host);
67 67
68 void set_contents_switcher_view( 68 void SetContentsSwitcherView(ContentsSwitcherView* contents_switcher_view);
69 ContentsSwitcherView* contents_switcher_view) {
70 contents_switcher_view_ = contents_switcher_view;
71 }
72 69
73 void ShowSearchResults(bool show); 70 void ShowSearchResults(bool show);
74 void ShowFolderContent(AppListFolderItem* folder); 71 void ShowFolderContent(AppListFolderItem* folder);
75 bool IsShowingSearchResults() const; 72 bool IsShowingSearchResults() const;
76 73
77 // Sets the active launcher page and animates the pages into place. 74 // Sets the active launcher page and animates the pages into place.
78 void SetActivePage(int page_index); 75 void SetActivePage(int page_index);
79 76
80 // The index of the currently active launcher page. 77 // The index of the currently active launcher page.
81 int GetActivePageIndex() const; 78 int GetActivePageIndex() const;
(...skipping 21 matching lines...) Expand all
103 virtual void Layout() OVERRIDE; 100 virtual void Layout() OVERRIDE;
104 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; 101 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
105 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; 102 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
106 103
107 // Overridden from PaginationModelObserver: 104 // Overridden from PaginationModelObserver:
108 virtual void TotalPagesChanged() OVERRIDE; 105 virtual void TotalPagesChanged() OVERRIDE;
109 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; 106 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE;
110 virtual void TransitionStarted() OVERRIDE; 107 virtual void TransitionStarted() OVERRIDE;
111 virtual void TransitionChanged() OVERRIDE; 108 virtual void TransitionChanged() OVERRIDE;
112 109
110 // Returns the pagination model for the ContentsView.
111 const PaginationModel& pagination_model() { return pagination_model_; }
112
113 private: 113 private:
114 // Sets the active launcher page, accounting for whether the change is for 114 // Sets the active launcher page, accounting for whether the change is for
115 // search results. 115 // search results.
116 void SetActivePageInternal(int page_index, bool show_search_results); 116 void SetActivePageInternal(int page_index, bool show_search_results);
117 117
118 // Invoked when active view is changed. 118 // Invoked when active view is changed.
119 void ActivePageChanged(bool show_search_results); 119 void ActivePageChanged(bool show_search_results);
120 120
121 // Calculates and sets the bounds for the subviews. If there is currently an 121 // Calculates and sets the bounds for the subviews. If there is currently an
122 // animation, this positions the views as appropriate for the current frame. 122 // animation, this positions the views as appropriate for the current frame.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 // Manages the pagination for the launcher pages. 159 // Manages the pagination for the launcher pages.
160 PaginationModel pagination_model_; 160 PaginationModel pagination_model_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(ContentsView); 162 DISALLOW_COPY_AND_ASSIGN(ContentsView);
163 }; 163 };
164 164
165 } // namespace app_list 165 } // namespace app_list
166 166
167 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 167 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/contents_switcher_view.cc ('k') | ui/app_list/views/contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698