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

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

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: 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
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 #include "ui/app_list/views/contents_view.h" 5 #include "ui/app_list/views/contents_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 AppListViewDelegate* view_delegate) { 49 AppListViewDelegate* view_delegate) {
50 DCHECK(model); 50 DCHECK(model);
51 51
52 if (app_list::switches::IsExperimentalAppListEnabled()) { 52 if (app_list::switches::IsExperimentalAppListEnabled()) {
53 std::vector<views::View*> custom_page_views = 53 std::vector<views::View*> custom_page_views =
54 view_delegate->CreateCustomPageWebViews(GetLocalBounds().size()); 54 view_delegate->CreateCustomPageWebViews(GetLocalBounds().size());
55 for (std::vector<views::View*>::const_iterator it = 55 for (std::vector<views::View*>::const_iterator it =
56 custom_page_views.begin(); 56 custom_page_views.begin();
57 it != custom_page_views.end(); 57 it != custom_page_views.end();
58 ++it) { 58 ++it) {
59 AddLauncherPage(*it, IDR_APP_LIST_NOTIFICATIONS_ICON); 59 // Only the first launcher page should be the custom launcher page state.
60 if (it == custom_page_views.begin()) {
61 AddLauncherPage(*it,
62 IDR_APP_LIST_NOTIFICATIONS_ICON,
63 AppListModel::STATE_CUSTOM_LAUNCHER_PAGE);
64 } else {
65 AddLauncherPage(*it, IDR_APP_LIST_NOTIFICATIONS_ICON);
66 }
60 } 67 }
61 68
62 start_page_view_ = new StartPageView(app_list_main_view_, view_delegate); 69 start_page_view_ = new StartPageView(app_list_main_view_, view_delegate);
63 AddLauncherPage( 70 AddLauncherPage(
64 start_page_view_, IDR_APP_LIST_SEARCH_ICON, AppListModel::STATE_START); 71 start_page_view_, IDR_APP_LIST_SEARCH_ICON, AppListModel::STATE_START);
65 } else { 72 } else {
66 search_results_view_ = 73 search_results_view_ =
67 new SearchResultListView(app_list_main_view_, view_delegate); 74 new SearchResultListView(app_list_main_view_, view_delegate);
68 AddLauncherPage( 75 AddLauncherPage(
69 search_results_view_, 0, AppListModel::STATE_SEARCH_RESULTS); 76 search_results_view_, 0, AppListModel::STATE_SEARCH_RESULTS);
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 364 }
358 365
359 void ContentsView::TransitionStarted() { 366 void ContentsView::TransitionStarted() {
360 } 367 }
361 368
362 void ContentsView::TransitionChanged() { 369 void ContentsView::TransitionChanged() {
363 UpdatePageBounds(); 370 UpdatePageBounds();
364 } 371 }
365 372
366 } // namespace app_list 373 } // namespace app_list
OLDNEW
« chrome/common/extensions/api/_permission_features.json ('K') | « ui/app_list/app_list_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698