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

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

Issue 683703002: Notify launcher page with onTransitionChanged event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher_page_api_show_state_notify
Patch Set: fix mac compile Created 6 years, 1 month 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_main_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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // between them. 42 // between them.
43 class APP_LIST_EXPORT ContentsView : public views::View, 43 class APP_LIST_EXPORT ContentsView : public views::View,
44 public PaginationModelObserver { 44 public PaginationModelObserver {
45 public: 45 public:
46 ContentsView(AppListMainView* app_list_main_view); 46 ContentsView(AppListMainView* app_list_main_view);
47 ~ContentsView() override; 47 ~ContentsView() override;
48 48
49 // Initialize the pages of the launcher. In the experimental launcher, should 49 // Initialize the pages of the launcher. In the experimental launcher, should
50 // be called after set_contents_switcher_view(), or switcher buttons will not 50 // be called after set_contents_switcher_view(), or switcher buttons will not
51 // be created. 51 // be created.
52 void Init(AppListModel* model, AppListViewDelegate* view_delegate); 52 void Init(AppListModel* model);
53 53
54 // 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.
55 void CancelDrag(); 55 void CancelDrag();
56 56
57 // 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
58 // operations outside the application list. 58 // operations outside the application list.
59 void SetDragAndDropHostOfCurrentAppList( 59 void SetDragAndDropHostOfCurrentAppList(
60 ApplicationDragAndDropHost* drag_and_drop_host); 60 ApplicationDragAndDropHost* drag_and_drop_host);
61 61
62 void SetContentsSwitcherView(ContentsSwitcherView* contents_switcher_view); 62 void SetContentsSwitcherView(ContentsSwitcherView* contents_switcher_view);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Invoked when active view is changed. 124 // Invoked when active view is changed.
125 void ActivePageChanged(bool show_search_results); 125 void ActivePageChanged(bool show_search_results);
126 126
127 // Returns the size of the default content area. 127 // Returns the size of the default content area.
128 gfx::Size GetDefaultContentsSize() const; 128 gfx::Size GetDefaultContentsSize() const;
129 129
130 // Gets the origin (the off-screen resting place) for a given launcher page 130 // Gets the origin (the off-screen resting place) for a given launcher page
131 // with index |page_index|. 131 // with index |page_index|.
132 gfx::Rect GetOffscreenPageBounds(int page_index) const; 132 gfx::Rect GetOffscreenPageBounds(int page_index) const;
133 133
134 // Notifies the view delegate that the custom launcher page's animation has
135 // changed.
136 void NotifyCustomLauncherPageAnimationChanged(double progress,
137 int current_page,
138 int target_page);
139
134 // Calculates and sets the bounds for the subviews. If there is currently an 140 // Calculates and sets the bounds for the subviews. If there is currently an
135 // animation, this positions the views as appropriate for the current frame. 141 // animation, this positions the views as appropriate for the current frame.
136 void UpdatePageBounds(); 142 void UpdatePageBounds();
137 143
138 // Adds |view| as a new page to the end of the list of launcher pages. The 144 // Adds |view| as a new page to the end of the list of launcher pages. The
139 // view is inserted as a child of the ContentsView, and a button with 145 // view is inserted as a child of the ContentsView, and a button with
140 // |resource_id| is added to the ContentsSwitcherView. There is no name 146 // |resource_id| is added to the ContentsSwitcherView. There is no name
141 // associated with the page. Returns the index of the new page. 147 // associated with the page. Returns the index of the new page.
142 int AddLauncherPage(views::View* view, int resource_id); 148 int AddLauncherPage(views::View* view, int resource_id);
143 149
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 182
177 // Manages the pagination for the launcher pages. 183 // Manages the pagination for the launcher pages.
178 PaginationModel pagination_model_; 184 PaginationModel pagination_model_;
179 185
180 DISALLOW_COPY_AND_ASSIGN(ContentsView); 186 DISALLOW_COPY_AND_ASSIGN(ContentsView);
181 }; 187 };
182 188
183 } // namespace app_list 189 } // namespace app_list
184 190
185 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 191 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_main_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