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

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

Issue 2934673002: Revert of Draggable peeking/fullscreen launcher with transparent background. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « ui/app_list/views/app_list_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 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "ui/app_list/app_list_export.h" 14 #include "ui/app_list/app_list_export.h"
15 #include "ui/app_list/app_list_model.h" 15 #include "ui/app_list/app_list_model.h"
16 #include "ui/app_list/pagination_model.h" 16 #include "ui/app_list/pagination_model.h"
17 #include "ui/app_list/pagination_model_observer.h" 17 #include "ui/app_list/pagination_model_observer.h"
18 #include "ui/views/view.h" 18 #include "ui/views/view.h"
19 #include "ui/views/view_model.h" 19 #include "ui/views/view_model.h"
20 20
21 namespace gfx { 21 namespace gfx {
22 class Rect; 22 class Rect;
23 } 23 }
24 24
25 namespace app_list { 25 namespace app_list {
26 26
27 class AppsGridView; 27 class AppsGridView;
28 class AppListPage; 28 class AppListPage;
29 class AppListView;
30 class ApplicationDragAndDropHost; 29 class ApplicationDragAndDropHost;
31 class AppListFolderItem; 30 class AppListFolderItem;
32 class AppListMainView; 31 class AppListMainView;
33 class AppsContainerView; 32 class AppsContainerView;
34 class CustomLauncherPageView; 33 class CustomLauncherPageView;
35 class PaginationModel; 34 class PaginationModel;
36 class SearchBoxView; 35 class SearchBoxView;
37 class SearchResultPageView; 36 class SearchResultPageView;
38 class StartPageView; 37 class StartPageView;
39 38
40 // A view to manage launcher pages within the Launcher (eg. start page, apps 39 // A view to manage launcher pages within the Launcher (eg. start page, apps
41 // grid view, search results). There can be any number of launcher pages, only 40 // grid view, search results). There can be any number of launcher pages, only
42 // one of which can be active at a given time. ContentsView provides the user 41 // one of which can be active at a given time. ContentsView provides the user
43 // interface for switching between launcher pages, and animates the transition 42 // interface for switching between launcher pages, and animates the transition
44 // between them. 43 // between them.
45 class APP_LIST_EXPORT ContentsView : public views::View, 44 class APP_LIST_EXPORT ContentsView : public views::View,
46 public PaginationModelObserver { 45 public PaginationModelObserver {
47 public: 46 public:
48 ContentsView(AppListMainView* app_list_main_view, AppListView* app_list_view); 47 explicit ContentsView(AppListMainView* app_list_main_view);
49 ~ContentsView() override; 48 ~ContentsView() override;
50 49
51 // Initialize the pages of the launcher. Should be called after 50 // Initialize the pages of the launcher. Should be called after
52 // set_contents_switcher_view(). 51 // set_contents_switcher_view().
53 void Init(AppListModel* model); 52 void Init(AppListModel* model);
54 53
55 // The app list gets closed and drag and drop operations need to be cancelled. 54 // The app list gets closed and drag and drop operations need to be cancelled.
56 void CancelDrag(); 55 void CancelDrag();
57 56
58 // If |drag_and_drop| is not NULL it will be called upon drag and drop 57 // If |drag_and_drop| is not NULL it will be called upon drag and drop
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 SearchResultPageView* search_results_page_view_; 184 SearchResultPageView* search_results_page_view_;
186 StartPageView* start_page_view_; 185 StartPageView* start_page_view_;
187 CustomLauncherPageView* custom_page_view_; 186 CustomLauncherPageView* custom_page_view_;
188 187
189 // The child page views. Owned by the views hierarchy. 188 // The child page views. Owned by the views hierarchy.
190 std::vector<AppListPage*> app_list_pages_; 189 std::vector<AppListPage*> app_list_pages_;
191 190
192 // Parent view. Owned by the views hierarchy. 191 // Parent view. Owned by the views hierarchy.
193 AppListMainView* app_list_main_view_; 192 AppListMainView* app_list_main_view_;
194 193
195 // Owned by the views hierarchy.
196 AppListView* const app_list_view_;
197
198 // Maps State onto |view_model_| indices. 194 // Maps State onto |view_model_| indices.
199 std::map<AppListModel::State, int> state_to_view_; 195 std::map<AppListModel::State, int> state_to_view_;
200 196
201 // Maps |view_model_| indices onto State. 197 // Maps |view_model_| indices onto State.
202 std::map<int, AppListModel::State> view_to_state_; 198 std::map<int, AppListModel::State> view_to_state_;
203 199
204 // The page that was showing before ShowSearchResults(true) was invoked. 200 // The page that was showing before ShowSearchResults(true) was invoked.
205 int page_before_search_; 201 int page_before_search_;
206 202
207 // Manages the pagination for the launcher pages. 203 // Manages the pagination for the launcher pages.
208 PaginationModel pagination_model_; 204 PaginationModel pagination_model_;
209 205
210 DISALLOW_COPY_AND_ASSIGN(ContentsView); 206 DISALLOW_COPY_AND_ASSIGN(ContentsView);
211 }; 207 };
212 208
213 } // namespace app_list 209 } // namespace app_list
214 210
215 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 211 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_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