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

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

Issue 380613002: Experimental app list: Added a current page indicator to the launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed static initializer. Created 6 years, 5 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_background.cc ('k') | ui/app_list/views/contents_switcher_view.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/app_list_main_view.h" 5 #include "ui/app_list/views/app_list_main_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 pagination_model->SelectPage(initial_apps_page, false); 132 pagination_model->SelectPage(initial_apps_page, false);
133 133
134 // Starts icon loading early. 134 // Starts icon loading early.
135 PreloadIcons(parent); 135 PreloadIcons(parent);
136 } 136 }
137 137
138 void AppListMainView::AddContentsViews() { 138 void AppListMainView::AddContentsViews() {
139 contents_view_ = new ContentsView(this); 139 contents_view_ = new ContentsView(this);
140 if (app_list::switches::IsExperimentalAppListEnabled()) { 140 if (app_list::switches::IsExperimentalAppListEnabled()) {
141 contents_switcher_view_ = new ContentsSwitcherView(contents_view_); 141 contents_switcher_view_ = new ContentsSwitcherView(contents_view_);
142 contents_view_->set_contents_switcher_view(contents_switcher_view_); 142 contents_view_->SetContentsSwitcherView(contents_switcher_view_);
143 } 143 }
144 contents_view_->InitNamedPages(model_, delegate_); 144 contents_view_->InitNamedPages(model_, delegate_);
145 AddChildView(contents_view_); 145 AddChildView(contents_view_);
146 if (contents_switcher_view_) 146 if (contents_switcher_view_)
147 AddChildView(contents_switcher_view_); 147 AddChildView(contents_switcher_view_);
148 148
149 search_box_view_->set_contents_view(contents_view_); 149 search_box_view_->set_contents_view(contents_view_);
150 150
151 contents_view_->SetPaintToLayer(true); 151 contents_view_->SetPaintToLayer(true);
152 contents_view_->SetFillsBoundsOpaquely(false); 152 contents_view_->SetFillsBoundsOpaquely(false);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // Resubmit the query via a posted task so that all observers for the 325 // Resubmit the query via a posted task so that all observers for the
326 // uninstall notification are notified. 326 // uninstall notification are notified.
327 base::MessageLoop::current()->PostTask( 327 base::MessageLoop::current()->PostTask(
328 FROM_HERE, 328 FROM_HERE,
329 base::Bind(&AppListMainView::QueryChanged, 329 base::Bind(&AppListMainView::QueryChanged,
330 weak_ptr_factory_.GetWeakPtr(), 330 weak_ptr_factory_.GetWeakPtr(),
331 search_box_view_)); 331 search_box_view_));
332 } 332 }
333 333
334 } // namespace app_list 334 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_background.cc ('k') | ui/app_list/views/contents_switcher_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698