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

Side by Side Diff: ash/wm/app_list_controller.h

Issue 302803002: Refactor app list so AppsGridView owns the PaginationModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests and bugs. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/wm/app_list_controller.cc » ('j') | ash/wm/app_list_controller.cc » ('J')
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 ASH_WM_APP_LIST_CONTROLLER_H_ 5 #ifndef ASH_WM_APP_LIST_CONTROLLER_H_
6 #define ASH_WM_APP_LIST_CONTROLLER_H_ 6 #define ASH_WM_APP_LIST_CONTROLLER_H_
7 7
8 #include "ash/shelf/shelf_icon_observer.h" 8 #include "ash/shelf/shelf_icon_observer.h"
9 #include "ash/shell_observer.h" 9 #include "ash/shell_observer.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // ShelfIconObserver overrides: 119 // ShelfIconObserver overrides:
120 virtual void OnShelfIconPositionsChanged() OVERRIDE; 120 virtual void OnShelfIconPositionsChanged() OVERRIDE;
121 121
122 // app_list::PaginationModelObserver overrides: 122 // app_list::PaginationModelObserver overrides:
123 virtual void TotalPagesChanged() OVERRIDE; 123 virtual void TotalPagesChanged() OVERRIDE;
124 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; 124 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE;
125 virtual void TransitionStarted() OVERRIDE; 125 virtual void TransitionStarted() OVERRIDE;
126 virtual void TransitionChanged() OVERRIDE; 126 virtual void TransitionChanged() OVERRIDE;
127 127
128 scoped_ptr<app_list::PaginationModel> pagination_model_;
129
130 // Whether we should show or hide app list widget. 128 // Whether we should show or hide app list widget.
131 bool is_visible_; 129 bool is_visible_;
132 130
133 // Whether the app list should remain centered. 131 // Whether the app list should remain centered.
134 bool is_centered_; 132 bool is_centered_;
135 133
136 // The AppListView this class manages, owned by its widget. 134 // The AppListView this class manages, owned by its widget.
137 app_list::AppListView* view_; 135 app_list::AppListView* view_;
138 136
137 // The pagination model owned by the AppListGridView of |view_|.
138 app_list::PaginationModel* pagination_model_;
139
140 // The current page of the AppListGridView of |view_|. This is stored outside
141 // of |pagination_model_|, so that it persists when the view is destroyed.
142 int current_app_page_;
143
139 // Cached bounds of |view_| for snapping back animation after over-scroll. 144 // Cached bounds of |view_| for snapping back animation after over-scroll.
140 gfx::Rect view_bounds_; 145 gfx::Rect view_bounds_;
141 146
142 // Whether should schedule snap back animation. 147 // Whether should schedule snap back animation.
143 bool should_snap_back_; 148 bool should_snap_back_;
144 149
145 DISALLOW_COPY_AND_ASSIGN(AppListController); 150 DISALLOW_COPY_AND_ASSIGN(AppListController);
146 }; 151 };
147 152
148 } // namespace ash 153 } // namespace ash
149 154
150 #endif // ASH_WM_APP_LIST_CONTROLLER_H_ 155 #endif // ASH_WM_APP_LIST_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/wm/app_list_controller.cc » ('j') | ash/wm/app_list_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698