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

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

Issue 186483004: Add a skeleton Start Page to the experimental app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ares_change_experimental_animation
Patch Set: fix initialization order Created 6 years, 7 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_main_view.h ('k') | ui/app_list/views/contents_switcher_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 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 pending_icon_loaders_.clear(); 158 pending_icon_loaders_.clear();
159 model_ = delegate_->GetModel(); 159 model_ = delegate_->GetModel();
160 search_box_view_->ModelChanged(); 160 search_box_view_->ModelChanged();
161 delete contents_view_; 161 delete contents_view_;
162 contents_view_ = NULL; 162 contents_view_ = NULL;
163 pagination_model_->SelectPage(0, false /* animate */); 163 pagination_model_->SelectPage(0, false /* animate */);
164 AddContentsView(); 164 AddContentsView();
165 Layout(); 165 Layout();
166 } 166 }
167 167
168 void AppListMainView::OnContentsViewShowStateChanged() {
169 search_box_view_->SetVisible(contents_view_->show_state() !=
170 ContentsView::SHOW_START_PAGE);
171 }
172
173 void AppListMainView::OnStartPageSearchButtonPressed() {
174 search_box_view_->SetVisible(true);
175 search_box_view_->search_box()->SetText(base::string16());
176 search_box_view_->RequestFocus();
177 }
178
168 void AppListMainView::SetDragAndDropHostOfCurrentAppList( 179 void AppListMainView::SetDragAndDropHostOfCurrentAppList(
169 ApplicationDragAndDropHost* drag_and_drop_host) { 180 ApplicationDragAndDropHost* drag_and_drop_host) {
170 contents_view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host); 181 contents_view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host);
171 } 182 }
172 183
173 bool AppListMainView::ShouldCenterWindow() const { 184 bool AppListMainView::ShouldCenterWindow() const {
174 return delegate_->ShouldCenterWindow(); 185 return delegate_->ShouldCenterWindow();
175 } 186 }
176 187
177 void AppListMainView::PreloadIcons(gfx::NativeView parent) { 188 void AppListMainView::PreloadIcons(gfx::NativeView parent) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // Resubmit the query via a posted task so that all observers for the 270 // Resubmit the query via a posted task so that all observers for the
260 // uninstall notification are notified. 271 // uninstall notification are notified.
261 base::MessageLoop::current()->PostTask( 272 base::MessageLoop::current()->PostTask(
262 FROM_HERE, 273 FROM_HERE,
263 base::Bind(&AppListMainView::QueryChanged, 274 base::Bind(&AppListMainView::QueryChanged,
264 weak_ptr_factory_.GetWeakPtr(), 275 weak_ptr_factory_.GetWeakPtr(),
265 search_box_view_)); 276 search_box_view_));
266 } 277 }
267 278
268 } // namespace app_list 279 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_main_view.h ('k') | ui/app_list/views/contents_switcher_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698