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

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

Issue 185143002: Revert of Ash:Shelf - Cleanup of Alternate Shelf (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « ash/test/shelf_view_test_api.cc ('k') | chrome/browser/about_flags.cc » ('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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 GetContainer(kShellWindowId_AppListContainer); 169 GetContainer(kShellWindowId_AppListContainer);
170 if (CommandLine::ForCurrentProcess()->HasSwitch( 170 if (CommandLine::ForCurrentProcess()->HasSwitch(
171 app_list::switches::kEnableExperimentalAppList)) { 171 app_list::switches::kEnableExperimentalAppList)) {
172 // The experimental app list is centered over the primary display. 172 // The experimental app list is centered over the primary display.
173 view->InitAsBubbleAtFixedLocation( 173 view->InitAsBubbleAtFixedLocation(
174 NULL, 174 NULL,
175 pagination_model_.get(), 175 pagination_model_.get(),
176 Shell::GetScreen()->GetPrimaryDisplay().bounds().CenterPoint(), 176 Shell::GetScreen()->GetPrimaryDisplay().bounds().CenterPoint(),
177 views::BubbleBorder::FLOAT, 177 views::BubbleBorder::FLOAT,
178 true /* border_accepts_events */); 178 true /* border_accepts_events */);
179 } else if (ash::switches::UseAlternateShelfLayout()) {
180 gfx::Rect applist_button_bounds = Shelf::ForWindow(container)->
181 GetAppListButtonView()->GetBoundsInScreen();
182 // We need the location of the button within the local screen.
183 applist_button_bounds = ScreenUtil::ConvertRectFromScreen(
184 root_window,
185 applist_button_bounds);
186 view->InitAsBubbleAttachedToAnchor(
187 container,
188 pagination_model_.get(),
189 Shelf::ForWindow(container)->GetAppListButtonView(),
190 GetAnchorPositionOffsetToShelf(applist_button_bounds,
191 Shelf::ForWindow(container)->GetAppListButtonView()->
192 GetWidget()),
193 GetBubbleArrow(container),
194 true /* border_accepts_events */);
195 view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
179 } else { 196 } else {
180 view->InitAsBubbleAttachedToAnchor( 197 view->InitAsBubbleAttachedToAnchor(
181 container, 198 container,
182 pagination_model_.get(), 199 pagination_model_.get(),
183 Shelf::ForWindow(container)->GetAppListButtonView(), 200 Shelf::ForWindow(container)->GetAppListButtonView(),
184 gfx::Vector2d(), 201 gfx::Vector2d(),
185 GetBubbleArrow(container), 202 GetBubbleArrow(container),
186 true /* border_accepts_events */); 203 true /* border_accepts_events */);
187 } 204 }
188 SetView(view); 205 SetView(view);
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 should_snap_back_ = false; 433 should_snap_back_ = false;
417 ui::ScopedLayerAnimationSettings animation(widget_animator); 434 ui::ScopedLayerAnimationSettings animation(widget_animator);
418 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds( 435 animation.SetTransitionDuration(base::TimeDelta::FromMilliseconds(
419 app_list::kOverscrollPageTransitionDurationMs)); 436 app_list::kOverscrollPageTransitionDurationMs));
420 widget->SetBounds(view_bounds_); 437 widget->SetBounds(view_bounds_);
421 } 438 }
422 } 439 }
423 440
424 } // namespace internal 441 } // namespace internal
425 } // namespace ash 442 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/shelf_view_test_api.cc ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698