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 266193009: Revert of Use experimental app list position whenever virtual keyboard is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « ui/app_list/views/app_list_main_view.h ('k') | ui/app_list/views/app_list_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 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::ShouldCenterWindow() const {
174 return delegate_->ShouldCenterWindow();
175 }
176
177 void AppListMainView::PreloadIcons(gfx::NativeView parent) { 173 void AppListMainView::PreloadIcons(gfx::NativeView parent) {
178 ui::ScaleFactor scale_factor = ui::SCALE_FACTOR_100P; 174 ui::ScaleFactor scale_factor = ui::SCALE_FACTOR_100P;
179 if (parent) 175 if (parent)
180 scale_factor = ui::GetScaleFactorForNativeView(parent); 176 scale_factor = ui::GetScaleFactorForNativeView(parent);
181 177
182 float scale = ui::GetImageScale(scale_factor); 178 float scale = ui::GetImageScale(scale_factor);
183 // |pagination_model| could have -1 as the initial selected page and 179 // |pagination_model| could have -1 as the initial selected page and
184 // assumes first page (i.e. index 0) will be used in this case. 180 // assumes first page (i.e. index 0) will be used in this case.
185 const int selected_page = std::max(0, pagination_model_->selected_page()); 181 const int selected_page = std::max(0, pagination_model_->selected_page());
186 182
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // Resubmit the query via a posted task so that all observers for the 255 // Resubmit the query via a posted task so that all observers for the
260 // uninstall notification are notified. 256 // uninstall notification are notified.
261 base::MessageLoop::current()->PostTask( 257 base::MessageLoop::current()->PostTask(
262 FROM_HERE, 258 FROM_HERE,
263 base::Bind(&AppListMainView::QueryChanged, 259 base::Bind(&AppListMainView::QueryChanged,
264 weak_ptr_factory_.GetWeakPtr(), 260 weak_ptr_factory_.GetWeakPtr(),
265 search_box_view_)); 261 search_box_view_));
266 } 262 }
267 263
268 } // namespace app_list 264 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_main_view.h ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698