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

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

Issue 2898743002: Draggable peeking/fullscreen launcher with transparent background. (Closed)
Patch Set: Removed header include in shell.h that was causing gn check failure. 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;
29 class ApplicationDragAndDropHost; 30 class ApplicationDragAndDropHost;
30 class AppListFolderItem; 31 class AppListFolderItem;
31 class AppListMainView; 32 class AppListMainView;
32 class AppsContainerView; 33 class AppsContainerView;
33 class CustomLauncherPageView; 34 class CustomLauncherPageView;
34 class PaginationModel; 35 class PaginationModel;
35 class SearchBoxView; 36 class SearchBoxView;
36 class SearchResultPageView; 37 class SearchResultPageView;
37 class StartPageView; 38 class StartPageView;
38 39
39 // A view to manage launcher pages within the Launcher (eg. start page, apps 40 // A view to manage launcher pages within the Launcher (eg. start page, apps
40 // grid view, search results). There can be any number of launcher pages, only 41 // grid view, search results). There can be any number of launcher pages, only
41 // one of which can be active at a given time. ContentsView provides the user 42 // one of which can be active at a given time. ContentsView provides the user
42 // interface for switching between launcher pages, and animates the transition 43 // interface for switching between launcher pages, and animates the transition
43 // between them. 44 // between them.
44 class APP_LIST_EXPORT ContentsView : public views::View, 45 class APP_LIST_EXPORT ContentsView : public views::View,
45 public PaginationModelObserver { 46 public PaginationModelObserver {
46 public: 47 public:
47 explicit ContentsView(AppListMainView* app_list_main_view); 48 ContentsView(AppListMainView* app_list_main_view, AppListView* app_list_view);
48 ~ContentsView() override; 49 ~ContentsView() override;
49 50
50 // Initialize the pages of the launcher. Should be called after 51 // Initialize the pages of the launcher. Should be called after
51 // set_contents_switcher_view(). 52 // set_contents_switcher_view().
52 void Init(AppListModel* model); 53 void Init(AppListModel* model);
53 54
54 // The app list gets closed and drag and drop operations need to be cancelled. 55 // The app list gets closed and drag and drop operations need to be cancelled.
55 void CancelDrag(); 56 void CancelDrag();
56 57
57 // If |drag_and_drop| is not NULL it will be called upon drag and drop 58 // 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
184 SearchResultPageView* search_results_page_view_; 185 SearchResultPageView* search_results_page_view_;
185 StartPageView* start_page_view_; 186 StartPageView* start_page_view_;
186 CustomLauncherPageView* custom_page_view_; 187 CustomLauncherPageView* custom_page_view_;
187 188
188 // The child page views. Owned by the views hierarchy. 189 // The child page views. Owned by the views hierarchy.
189 std::vector<AppListPage*> app_list_pages_; 190 std::vector<AppListPage*> app_list_pages_;
190 191
191 // Parent view. Owned by the views hierarchy. 192 // Parent view. Owned by the views hierarchy.
192 AppListMainView* app_list_main_view_; 193 AppListMainView* app_list_main_view_;
193 194
195 // Owned by the views hierarchy.
196 AppListView* const app_list_view_;
197
194 // Maps State onto |view_model_| indices. 198 // Maps State onto |view_model_| indices.
195 std::map<AppListModel::State, int> state_to_view_; 199 std::map<AppListModel::State, int> state_to_view_;
196 200
197 // Maps |view_model_| indices onto State. 201 // Maps |view_model_| indices onto State.
198 std::map<int, AppListModel::State> view_to_state_; 202 std::map<int, AppListModel::State> view_to_state_;
199 203
200 // The page that was showing before ShowSearchResults(true) was invoked. 204 // The page that was showing before ShowSearchResults(true) was invoked.
201 int page_before_search_; 205 int page_before_search_;
202 206
203 // Manages the pagination for the launcher pages. 207 // Manages the pagination for the launcher pages.
204 PaginationModel pagination_model_; 208 PaginationModel pagination_model_;
205 209
206 DISALLOW_COPY_AND_ASSIGN(ContentsView); 210 DISALLOW_COPY_AND_ASSIGN(ContentsView);
207 }; 211 };
208 212
209 } // namespace app_list 213 } // namespace app_list
210 214
211 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 215 #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