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

Unified Diff: ash/wm/app_list_controller.cc

Issue 140323010: Ash:Shelf - Cleanup of Alternate Shelf (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/app_list_controller.cc
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
index 560f0044fafb7c5f7c9f4746ab4d9bab41af2c68..8297aa0d054ed46a6eb6c133dbadbfb5b7b7aabd 100644
--- a/ash/wm/app_list_controller.cc
+++ b/ash/wm/app_list_controller.cc
@@ -166,32 +166,22 @@ void AppListController::SetVisible(bool visible, aura::Window* window) {
aura::Window* root_window = window->GetRootWindow();
aura::Window* container = GetRootWindowController(root_window)->
GetContainer(kShellWindowId_AppListContainer);
- if (ash::switches::UseAlternateShelfLayout()) {
- gfx::Rect applist_button_bounds = Shelf::ForWindow(container)->
- GetAppListButtonView()->GetBoundsInScreen();
- // We need the location of the button within the local screen.
- applist_button_bounds = ScreenUtil::ConvertRectFromScreen(
- root_window,
- applist_button_bounds);
- view->InitAsBubbleAttachedToAnchor(
- container,
- pagination_model_.get(),
- Shelf::ForWindow(container)->GetAppListButtonView(),
- GetAnchorPositionOffsetToShelf(applist_button_bounds,
- Shelf::ForWindow(container)->GetAppListButtonView()->
- GetWidget()),
- GetBubbleArrow(container),
- true /* border_accepts_events */);
- view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
- } else {
- view->InitAsBubbleAttachedToAnchor(
- container,
- pagination_model_.get(),
- Shelf::ForWindow(container)->GetAppListButtonView(),
- gfx::Vector2d(),
- GetBubbleArrow(container),
- true /* border_accepts_events */);
- }
+ gfx::Rect applist_button_bounds = Shelf::ForWindow(container)->
+ GetAppListButtonView()->GetBoundsInScreen();
+ // We need the location of the button within the local screen.
+ applist_button_bounds = ScreenUtil::ConvertRectFromScreen(
+ root_window,
+ applist_button_bounds);
+ view->InitAsBubbleAttachedToAnchor(
+ container,
+ pagination_model_.get(),
+ Shelf::ForWindow(container)->GetAppListButtonView(),
+ GetAnchorPositionOffsetToShelf(applist_button_bounds,
+ Shelf::ForWindow(container)->GetAppListButtonView()->
+ GetWidget()),
+ GetBubbleArrow(container),
+ true /* border_accepts_events */);
+ view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
SetView(view);
// By setting us as DnD recipient, the app list knows that we can
// handle items.

Powered by Google App Engine
This is Rietveld 408576698