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

Side by Side Diff: ash/wm/app_list_controller.cc

Issue 263883002: Renamed app list position flag to --enable-centered-app-list. (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/app/generated_resources.grd » ('j') | chrome/app/generated_resources.grd » ('J')
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 view_->GetWidget()->Deactivate(); 164 view_->GetWidget()->Deactivate();
165 ScheduleAnimation(); 165 ScheduleAnimation();
166 } else if (is_visible_) { 166 } else if (is_visible_) {
167 // AppListModel and AppListViewDelegate are owned by AppListView. They 167 // AppListModel and AppListViewDelegate are owned by AppListView. They
168 // will be released with AppListView on close. 168 // will be released with AppListView on close.
169 app_list::AppListView* view = new app_list::AppListView( 169 app_list::AppListView* view = new app_list::AppListView(
170 Shell::GetInstance()->delegate()->CreateAppListViewDelegate()); 170 Shell::GetInstance()->delegate()->CreateAppListViewDelegate());
171 aura::Window* root_window = window->GetRootWindow(); 171 aura::Window* root_window = window->GetRootWindow();
172 aura::Window* container = GetRootWindowController(root_window)-> 172 aura::Window* container = GetRootWindowController(root_window)->
173 GetContainer(kShellWindowId_AppListContainer); 173 GetContainer(kShellWindowId_AppListContainer);
174 is_centered_ = app_list::switches::IsExperimentalAppListPositionEnabled(); 174 is_centered_ = app_list::switches::IsAppListCentered();
175 if (is_centered_) { 175 if (is_centered_) {
176 // The experimental app list is centered over the primary display. 176 // The experimental app list is centered over the primary display.
177 view->InitAsBubbleAtFixedLocation( 177 view->InitAsBubbleAtFixedLocation(
178 NULL, 178 NULL,
179 pagination_model_.get(), 179 pagination_model_.get(),
180 GetScreenCenter(), 180 GetScreenCenter(),
181 views::BubbleBorder::FLOAT, 181 views::BubbleBorder::FLOAT,
182 true /* border_accepts_events */); 182 true /* border_accepts_events */);
183 } else { 183 } else {
184 gfx::Rect applist_button_bounds = Shelf::ForWindow(container)-> 184 gfx::Rect applist_button_bounds = Shelf::ForWindow(container)->
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } else if (should_snap_back_) { 433 } else if (should_snap_back_) {
434 should_snap_back_ = false; 434 should_snap_back_ = false;
435 ui::ScopedLayerAnimationSettings animation(widget_animator); 435 ui::ScopedLayerAnimationSettings animation(widget_animator);
436 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( 436 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
437 app_list::kOverscrollPageTransitionDurationMs)); 437 app_list::kOverscrollPageTransitionDurationMs));
438 widget->SetBounds(view_bounds_); 438 widget->SetBounds(view_bounds_);
439 } 439 }
440 } 440 }
441 441
442 } // namespace ash 442 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | chrome/app/generated_resources.grd » ('J')

Powered by Google App Engine
This is Rietveld 408576698