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

Side by Side Diff: ash/app_list/app_list_presenter_delegate.cc

Issue 2113053003: Moves Shell::maximize_mode_controller() to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: order Created 4 years, 5 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
« no previous file with comments | « ash/accelerators/debug_commands.cc ('k') | ash/common/wm_shell.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/app_list/app_list_presenter_delegate.h" 5 #include "ash/app_list/app_list_presenter_delegate.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/common/shelf/shelf_types.h" 8 #include "ash/common/shelf/shelf_types.h"
9 #include "ash/common/shell_window_ids.h" 9 #include "ash/common/shell_window_ids.h"
10 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 10 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 view_ = view; 150 view_ = view;
151 aura::Window* root_window = Shell::GetInstance() 151 aura::Window* root_window = Shell::GetInstance()
152 ->window_tree_host_manager() 152 ->window_tree_host_manager()
153 ->GetRootWindowForDisplayId(display_id); 153 ->GetRootWindowForDisplayId(display_id);
154 aura::Window* container = GetRootWindowController(root_window) 154 aura::Window* container = GetRootWindowController(root_window)
155 ->GetContainer(kShellWindowId_AppListContainer); 155 ->GetContainer(kShellWindowId_AppListContainer);
156 AppListButton* applist_button = 156 AppListButton* applist_button =
157 Shelf::ForWindow(container)->GetAppListButton(); 157 Shelf::ForWindow(container)->GetAppListButton();
158 is_centered_ = view->ShouldCenterWindow(); 158 is_centered_ = view->ShouldCenterWindow();
159 bool is_fullscreen = IsFullscreenAppListEnabled() && 159 bool is_fullscreen = IsFullscreenAppListEnabled() &&
160 Shell::GetInstance() 160 WmShell::Get()
161 ->maximize_mode_controller() 161 ->maximize_mode_controller()
162 ->IsMaximizeModeWindowManagerEnabled(); 162 ->IsMaximizeModeWindowManagerEnabled();
163 if (is_fullscreen) { 163 if (is_fullscreen) {
164 view->InitAsFramelessWindow( 164 view->InitAsFramelessWindow(
165 container, current_apps_page, 165 container, current_apps_page,
166 ScreenUtil::GetDisplayWorkAreaBoundsInParent(container)); 166 ScreenUtil::GetDisplayWorkAreaBoundsInParent(container));
167 } else if (is_centered_) { 167 } else if (is_centered_) {
168 // Note: We can't center the app list until we have its dimensions, so we 168 // Note: We can't center the app list until we have its dimensions, so we
169 // init at (0, 0) and then reset its anchor point. 169 // init at (0, 0) and then reset its anchor point.
170 view->InitAsBubbleAtFixedLocation(container, current_apps_page, 170 view->InitAsBubbleAtFixedLocation(container, current_apps_page,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 337 }
338 338
339 //////////////////////////////////////////////////////////////////////////////// 339 ////////////////////////////////////////////////////////////////////////////////
340 // AppListPresenterDelegate, ShelfIconObserver implementation: 340 // AppListPresenterDelegate, ShelfIconObserver implementation:
341 341
342 void AppListPresenterDelegate::OnShelfIconPositionsChanged() { 342 void AppListPresenterDelegate::OnShelfIconPositionsChanged() {
343 UpdateBounds(); 343 UpdateBounds();
344 } 344 }
345 345
346 } // namespace ash 346 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/debug_commands.cc ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698