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

Side by Side Diff: ash/wm/app_list_controller.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 "ash/wm/app_list_controller.h" 5 #include "ash/wm/app_list_controller.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/screen_util.h" 9 #include "ash/screen_util.h"
10 #include "ash/shelf/shelf.h" 10 #include "ash/shelf/shelf.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 view_->GetWidget()->Deactivate(); 158 view_->GetWidget()->Deactivate();
159 ScheduleAnimation(); 159 ScheduleAnimation();
160 } else if (is_visible_) { 160 } else if (is_visible_) {
161 // AppListModel and AppListViewDelegate are owned by AppListView. They 161 // AppListModel and AppListViewDelegate are owned by AppListView. They
162 // will be released with AppListView on close. 162 // will be released with AppListView on close.
163 app_list::AppListView* view = new app_list::AppListView( 163 app_list::AppListView* view = new app_list::AppListView(
164 Shell::GetInstance()->delegate()->CreateAppListViewDelegate()); 164 Shell::GetInstance()->delegate()->CreateAppListViewDelegate());
165 aura::Window* root_window = window->GetRootWindow(); 165 aura::Window* root_window = window->GetRootWindow();
166 aura::Window* container = GetRootWindowController(root_window)-> 166 aura::Window* container = GetRootWindowController(root_window)->
167 GetContainer(kShellWindowId_AppListContainer); 167 GetContainer(kShellWindowId_AppListContainer);
168 if (app_list::switches::IsExperimentalAppListPositionEnabled()) { 168 if (view->UseExperimentalAppListPosition()) {
varkha 2014/04/30 16:20:15 I agree, let's remove any mention of "experimental
Matt Giuca 2014/05/05 06:18:05 Done.
169 // The experimental app list is centered over the primary display. 169 // The experimental app list is centered over the primary display.
170 view->InitAsBubbleCenteredOnPrimaryDisplay( 170 view->InitAsBubbleCenteredOnPrimaryDisplay(
171 NULL, 171 NULL,
172 pagination_model_.get(), 172 pagination_model_.get(),
173 Shell::GetScreen(), 173 Shell::GetScreen(),
174 views::BubbleBorder::FLOAT, 174 views::BubbleBorder::FLOAT,
175 true /* border_accepts_events */); 175 true /* border_accepts_events */);
176 } else { 176 } else {
177 gfx::Rect applist_button_bounds = Shelf::ForWindow(container)-> 177 gfx::Rect applist_button_bounds = Shelf::ForWindow(container)->
178 GetAppListButtonView()->GetBoundsInScreen(); 178 GetAppListButtonView()->GetBoundsInScreen();
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } else if (should_snap_back_) { 421 } else if (should_snap_back_) {
422 should_snap_back_ = false; 422 should_snap_back_ = false;
423 ui::ScopedLayerAnimationSettings animation(widget_animator); 423 ui::ScopedLayerAnimationSettings animation(widget_animator);
424 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( 424 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
425 app_list::kOverscrollPageTransitionDurationMs)); 425 app_list::kOverscrollPageTransitionDurationMs));
426 widget->SetBounds(view_bounds_); 426 widget->SetBounds(view_bounds_);
427 } 427 }
428 } 428 }
429 429
430 } // namespace ash 430 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698