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

Side by Side Diff: ash/wm/app_list_controller.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 | « no previous file | chrome/browser/ui/app_list/app_list_view_delegate.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 (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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 view_->GetWidget()->Deactivate(); 176 view_->GetWidget()->Deactivate();
177 ScheduleAnimation(); 177 ScheduleAnimation();
178 } else if (is_visible_) { 178 } else if (is_visible_) {
179 // AppListModel and AppListViewDelegate are owned by AppListView. They 179 // AppListModel and AppListViewDelegate are owned by AppListView. They
180 // will be released with AppListView on close. 180 // will be released with AppListView on close.
181 app_list::AppListView* view = new app_list::AppListView( 181 app_list::AppListView* view = new app_list::AppListView(
182 Shell::GetInstance()->delegate()->CreateAppListViewDelegate()); 182 Shell::GetInstance()->delegate()->CreateAppListViewDelegate());
183 aura::Window* root_window = window->GetRootWindow(); 183 aura::Window* root_window = window->GetRootWindow();
184 aura::Window* container = GetRootWindowController(root_window)-> 184 aura::Window* container = GetRootWindowController(root_window)->
185 GetContainer(kShellWindowId_AppListContainer); 185 GetContainer(kShellWindowId_AppListContainer);
186 is_centered_ = view->ShouldCenterWindow(); 186 is_centered_ = app_list::switches::IsCenteredAppListEnabled();
187 if (is_centered_) { 187 if (is_centered_) {
188 // The experimental app list is centered over the primary display. 188 // The experimental app list is centered over the primary display.
189 view->InitAsBubbleAtFixedLocation( 189 view->InitAsBubbleAtFixedLocation(
190 NULL, 190 NULL,
191 pagination_model_.get(), 191 pagination_model_.get(),
192 GetScreenCenter(), 192 GetScreenCenter(),
193 views::BubbleBorder::FLOAT, 193 views::BubbleBorder::FLOAT,
194 true /* border_accepts_events */); 194 true /* border_accepts_events */);
195 } else { 195 } else {
196 gfx::Rect applist_button_bounds = Shelf::ForWindow(container)-> 196 gfx::Rect applist_button_bounds = Shelf::ForWindow(container)->
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 } else if (should_snap_back_) { 460 } else if (should_snap_back_) {
461 should_snap_back_ = false; 461 should_snap_back_ = false;
462 ui::ScopedLayerAnimationSettings animation(widget_animator); 462 ui::ScopedLayerAnimationSettings animation(widget_animator);
463 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( 463 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
464 app_list::kOverscrollPageTransitionDurationMs)); 464 app_list::kOverscrollPageTransitionDurationMs));
465 widget->SetBounds(view_bounds_); 465 widget->SetBounds(view_bounds_);
466 } 466 }
467 } 467 }
468 468
469 } // namespace ash 469 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698