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

Side by Side Diff: ash/shell.cc

Issue 1898223002: Removes most aura dependencies from WindowResizer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_aura_from_window_state
Patch Set: nit and merge Created 4 years, 8 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/shelf/shelf_view.cc ('k') | ash/test/ui_controls_factory_ash.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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "ash/shell_window_ids.h" 53 #include "ash/shell_window_ids.h"
54 #include "ash/system/locale/locale_notification_controller.h" 54 #include "ash/system/locale/locale_notification_controller.h"
55 #include "ash/system/status_area_widget.h" 55 #include "ash/system/status_area_widget.h"
56 #include "ash/system/toast/toast_manager.h" 56 #include "ash/system/toast/toast_manager.h"
57 #include "ash/system/tray/system_tray_delegate.h" 57 #include "ash/system/tray/system_tray_delegate.h"
58 #include "ash/system/tray/system_tray_notifier.h" 58 #include "ash/system/tray/system_tray_notifier.h"
59 #include "ash/utility/partial_screenshot_controller.h" 59 #include "ash/utility/partial_screenshot_controller.h"
60 #include "ash/wm/ash_focus_rules.h" 60 #include "ash/wm/ash_focus_rules.h"
61 #include "ash/wm/ash_native_cursor_manager.h" 61 #include "ash/wm/ash_native_cursor_manager.h"
62 #include "ash/wm/aura/wm_globals_aura.h" 62 #include "ash/wm/aura/wm_globals_aura.h"
63 #include "ash/wm/coordinate_conversion.h" 63 #include "ash/wm/common/root_window_finder.h"
64 #include "ash/wm/event_client_impl.h" 64 #include "ash/wm/event_client_impl.h"
65 #include "ash/wm/lock_state_controller.h" 65 #include "ash/wm/lock_state_controller.h"
66 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 66 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
67 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" 67 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h"
68 #include "ash/wm/mru_window_tracker.h" 68 #include "ash/wm/mru_window_tracker.h"
69 #include "ash/wm/overlay_event_filter.h" 69 #include "ash/wm/overlay_event_filter.h"
70 #include "ash/wm/overview/window_selector_controller.h" 70 #include "ash/wm/overview/window_selector_controller.h"
71 #include "ash/wm/power_button_controller.h" 71 #include "ash/wm/power_button_controller.h"
72 #include "ash/wm/resize_shadow_controller.h" 72 #include "ash/wm/resize_shadow_controller.h"
73 #include "ash/wm/root_window_layout_manager.h" 73 #include "ash/wm/root_window_layout_manager.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 void Shell::ShowContextMenu(const gfx::Point& location_in_screen, 293 void Shell::ShowContextMenu(const gfx::Point& location_in_screen,
294 ui::MenuSourceType source_type) { 294 ui::MenuSourceType source_type) {
295 // No context menus if there is no session with an active user. 295 // No context menus if there is no session with an active user.
296 if (!session_state_delegate_->NumberOfLoggedInUsers()) 296 if (!session_state_delegate_->NumberOfLoggedInUsers())
297 return; 297 return;
298 // No context menus when screen is locked. 298 // No context menus when screen is locked.
299 if (session_state_delegate_->IsScreenLocked()) 299 if (session_state_delegate_->IsScreenLocked())
300 return; 300 return;
301 301
302 aura::Window* root = 302 aura::Window* root = wm::WmWindowAura::GetAuraWindow(
303 wm::GetRootWindowMatching(gfx::Rect(location_in_screen, gfx::Size())); 303 wm::GetRootWindowMatching(gfx::Rect(location_in_screen, gfx::Size())));
304 GetRootWindowController(root) 304 GetRootWindowController(root)
305 ->ShowContextMenu(location_in_screen, source_type); 305 ->ShowContextMenu(location_in_screen, source_type);
306 } 306 }
307 307
308 void Shell::ShowAppList(aura::Window* window) { 308 void Shell::ShowAppList(aura::Window* window) {
309 // If the context window is not given, show it on the target root window. 309 // If the context window is not given, show it on the target root window.
310 if (!window) 310 if (!window)
311 window = GetTargetRootWindow(); 311 window = GetTargetRootWindow();
312 delegate_->GetAppListPresenter()->Show(window); 312 delegate_->GetAppListPresenter()->Show(window);
313 } 313 }
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 1229
1230 void Shell::OnWindowActivated( 1230 void Shell::OnWindowActivated(
1231 aura::client::ActivationChangeObserver::ActivationReason reason, 1231 aura::client::ActivationChangeObserver::ActivationReason reason,
1232 aura::Window* gained_active, 1232 aura::Window* gained_active,
1233 aura::Window* lost_active) { 1233 aura::Window* lost_active) {
1234 if (gained_active) 1234 if (gained_active)
1235 target_root_window_ = gained_active->GetRootWindow(); 1235 target_root_window_ = gained_active->GetRootWindow();
1236 } 1236 }
1237 1237
1238 } // namespace ash 1238 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/test/ui_controls_factory_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698