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

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

Issue 253983002: Use centered app list position whenever virtual keyboard is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only change shape when keyboard enabled (not when it *might* be enabled). 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 | Annotate | Revision Log
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::SetDragAndDropHostOfCurrentAppList( 168 void AppListMainView::SetDragAndDropHostOfCurrentAppList(
169 ApplicationDragAndDropHost* drag_and_drop_host) { 169 ApplicationDragAndDropHost* drag_and_drop_host) {
170 contents_view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host); 170 contents_view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host);
171 } 171 }
172 172
173 bool AppListMainView::UseExperimentalAppListPosition() const {
174 return delegate_->UseExperimentalAppListPosition();
175 }
176
173 void AppListMainView::PreloadIcons(gfx::NativeView parent) { 177 void AppListMainView::PreloadIcons(gfx::NativeView parent) {
174 ui::ScaleFactor scale_factor = ui::SCALE_FACTOR_100P; 178 ui::ScaleFactor scale_factor = ui::SCALE_FACTOR_100P;
175 if (parent) 179 if (parent)
176 scale_factor = ui::GetScaleFactorForNativeView(parent); 180 scale_factor = ui::GetScaleFactorForNativeView(parent);
177 181
178 float scale = ui::GetImageScale(scale_factor); 182 float scale = ui::GetImageScale(scale_factor);
179 // |pagination_model| could have -1 as the initial selected page and 183 // |pagination_model| could have -1 as the initial selected page and
180 // assumes first page (i.e. index 0) will be used in this case. 184 // assumes first page (i.e. index 0) will be used in this case.
181 const int selected_page = std::max(0, pagination_model_->selected_page()); 185 const int selected_page = std::max(0, pagination_model_->selected_page());
182 186
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // Resubmit the query via a posted task so that all observers for the 259 // Resubmit the query via a posted task so that all observers for the
256 // uninstall notification are notified. 260 // uninstall notification are notified.
257 base::MessageLoop::current()->PostTask( 261 base::MessageLoop::current()->PostTask(
258 FROM_HERE, 262 FROM_HERE,
259 base::Bind(&AppListMainView::QueryChanged, 263 base::Bind(&AppListMainView::QueryChanged,
260 weak_ptr_factory_.GetWeakPtr(), 264 weak_ptr_factory_.GetWeakPtr(),
261 search_box_view_)); 265 search_box_view_));
262 } 266 }
263 267
264 } // namespace app_list 268 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698