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

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

Issue 598013003: Added views::ViewModelT<T>, a type-safe template version of ViewModel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@appsgridview-static-casts
Patch Set: DISALLOW_COPY_AND_ASSIGN. Created 6 years, 2 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
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"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "ui/app_list/app_list_export.h" 13 #include "ui/app_list/app_list_export.h"
14 #include "ui/app_list/pagination_model.h" 14 #include "ui/app_list/pagination_model.h"
15 #include "ui/app_list/pagination_model_observer.h" 15 #include "ui/app_list/pagination_model_observer.h"
16 #include "ui/views/view.h" 16 #include "ui/views/view.h"
17 #include "ui/views/view_model.h"
17 18
18 namespace gfx { 19 namespace gfx {
19 class Rect; 20 class Rect;
20 } 21 }
21 22
22 namespace views {
23 class ViewModel;
24 }
25
26 namespace app_list { 23 namespace app_list {
27 24
28 class AppsGridView; 25 class AppsGridView;
29 class ApplicationDragAndDropHost; 26 class ApplicationDragAndDropHost;
30 class AppListFolderItem; 27 class AppListFolderItem;
31 class AppListMainView; 28 class AppListMainView;
32 class AppListModel; 29 class AppListModel;
33 class AppListViewDelegate; 30 class AppListViewDelegate;
34 class AppsContainerView; 31 class AppsContainerView;
35 class ContentsSwitcherView; 32 class ContentsSwitcherView;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 150
154 // Special sub views of the ContentsView. All owned by the views hierarchy. 151 // Special sub views of the ContentsView. All owned by the views hierarchy.
155 AppsContainerView* apps_container_view_; 152 AppsContainerView* apps_container_view_;
156 SearchResultListView* search_results_view_; 153 SearchResultListView* search_results_view_;
157 StartPageView* start_page_view_; 154 StartPageView* start_page_view_;
158 155
159 AppListMainView* app_list_main_view_; // Parent view, owns this. 156 AppListMainView* app_list_main_view_; // Parent view, owns this.
160 // Sibling view, owned by |app_list_main_view_|. 157 // Sibling view, owned by |app_list_main_view_|.
161 ContentsSwitcherView* contents_switcher_view_; 158 ContentsSwitcherView* contents_switcher_view_;
162 159
163 scoped_ptr<views::ViewModel> view_model_; 160 scoped_ptr<views::ViewModel<views::View>> view_model_;
164 // Maps NamedPage onto |view_model_| indices. 161 // Maps NamedPage onto |view_model_| indices.
165 std::map<NamedPage, int> named_page_to_view_; 162 std::map<NamedPage, int> named_page_to_view_;
166 163
167 // The page that was showing before ShowSearchResults(true) was invoked. 164 // The page that was showing before ShowSearchResults(true) was invoked.
168 int page_before_search_; 165 int page_before_search_;
169 166
170 // Manages the pagination for the launcher pages. 167 // Manages the pagination for the launcher pages.
171 PaginationModel pagination_model_; 168 PaginationModel pagination_model_;
172 169
173 DISALLOW_COPY_AND_ASSIGN(ContentsView); 170 DISALLOW_COPY_AND_ASSIGN(ContentsView);
174 }; 171 };
175 172
176 } // namespace app_list 173 } // namespace app_list
177 174
178 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 175 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698