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

Side by Side Diff: ui/app_list/views/app_list_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 (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/app_list_view.h" 5 #include "ui/app_list/views/app_list_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 app_list_main_view_->Close(); 209 app_list_main_view_->Close();
210 delegate_->Dismiss(); 210 delegate_->Dismiss();
211 } 211 }
212 212
213 void AppListView::UpdateBounds() { 213 void AppListView::UpdateBounds() {
214 if (screen_to_keep_centered_on_) 214 if (screen_to_keep_centered_on_)
215 SetAnchorRect(gfx::Rect(GetCenterPoint(), gfx::Size())); 215 SetAnchorRect(gfx::Rect(GetCenterPoint(), gfx::Size()));
216 SizeToContents(); 216 SizeToContents();
217 } 217 }
218 218
219 bool AppListView::UseExperimentalAppListPosition() const {
220 return delegate_->UseExperimentalAppListPosition();
221 }
222
219 gfx::Size AppListView::GetPreferredSize() { 223 gfx::Size AppListView::GetPreferredSize() {
220 return app_list_main_view_->GetPreferredSize(); 224 return app_list_main_view_->GetPreferredSize();
221 } 225 }
222 226
223 void AppListView::Paint(gfx::Canvas* canvas) { 227 void AppListView::Paint(gfx::Canvas* canvas) {
224 views::BubbleDelegateView::Paint(canvas); 228 views::BubbleDelegateView::Paint(canvas);
225 if (g_next_paint_callback) { 229 if (g_next_paint_callback) {
226 g_next_paint_callback(); 230 g_next_paint_callback();
227 g_next_paint_callback = NULL; 231 g_next_paint_callback = NULL;
228 } 232 }
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 #else 549 #else
546 speech_view_->SetVisible(recognizing); 550 speech_view_->SetVisible(recognizing);
547 app_list_main_view_->SetVisible(!recognizing); 551 app_list_main_view_->SetVisible(!recognizing);
548 552
549 // Needs to schedule paint of AppListView itself, to repaint the background. 553 // Needs to schedule paint of AppListView itself, to repaint the background.
550 GetBubbleFrameView()->SchedulePaint(); 554 GetBubbleFrameView()->SchedulePaint();
551 #endif 555 #endif
552 } 556 }
553 557
554 } // namespace app_list 558 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698