| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/aura/wm_shell_aura.h" | 5 #include "ash/aura/wm_shell_aura.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/aura/scoped_root_window_for_new_windows_aura.h" |
| 9 #include "ash/aura/wm_window_aura.h" | 10 #include "ash/aura/wm_window_aura.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 11 #include "ash/common/session/session_state_delegate.h" |
| 11 #include "ash/common/shell_delegate.h" | 12 #include "ash/common/shell_delegate.h" |
| 12 #include "ash/common/shell_observer.h" | 13 #include "ash/common/shell_observer.h" |
| 13 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" | 14 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" |
| 14 #include "ash/common/wm/mru_window_tracker.h" | 15 #include "ash/common/wm/mru_window_tracker.h" |
| 15 #include "ash/common/wm/overview/window_selector_controller.h" | 16 #include "ash/common/wm/overview/window_selector_controller.h" |
| 16 #include "ash/common/wm_activation_observer.h" | 17 #include "ash/common/wm_activation_observer.h" |
| 17 #include "ash/common/wm_display_observer.h" | 18 #include "ash/common/wm_display_observer.h" |
| 18 #include "ash/display/display_manager.h" | 19 #include "ash/display/display_manager.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 WmWindow* WmShellAura::GetRootWindowForDisplayId(int64_t display_id) { | 85 WmWindow* WmShellAura::GetRootWindowForDisplayId(int64_t display_id) { |
| 85 return WmWindowAura::Get(Shell::GetInstance() | 86 return WmWindowAura::Get(Shell::GetInstance() |
| 86 ->window_tree_host_manager() | 87 ->window_tree_host_manager() |
| 87 ->GetRootWindowForDisplayId(display_id)); | 88 ->GetRootWindowForDisplayId(display_id)); |
| 88 } | 89 } |
| 89 | 90 |
| 90 WmWindow* WmShellAura::GetRootWindowForNewWindows() { | 91 WmWindow* WmShellAura::GetRootWindowForNewWindows() { |
| 91 return WmWindowAura::Get(Shell::GetTargetRootWindow()); | 92 return WmWindowAura::Get(Shell::GetTargetRootWindow()); |
| 92 } | 93 } |
| 93 | 94 |
| 95 std::unique_ptr<ScopedRootWindowForNewWindows> |
| 96 WmShellAura::CreateScopedRootWindowForNewWindows(WmWindow* root) { |
| 97 return base::MakeUnique<ScopedRootWindowForNewWindowsAura>( |
| 98 WmWindowAura::GetAuraWindow(root)); |
| 99 } |
| 100 |
| 94 const DisplayInfo& WmShellAura::GetDisplayInfo(int64_t display_id) const { | 101 const DisplayInfo& WmShellAura::GetDisplayInfo(int64_t display_id) const { |
| 95 return Shell::GetInstance()->display_manager()->GetDisplayInfo(display_id); | 102 return Shell::GetInstance()->display_manager()->GetDisplayInfo(display_id); |
| 96 } | 103 } |
| 97 | 104 |
| 98 bool WmShellAura::IsActiveDisplayId(int64_t display_id) const { | 105 bool WmShellAura::IsActiveDisplayId(int64_t display_id) const { |
| 99 return Shell::GetInstance()->display_manager()->IsActiveDisplayId(display_id); | 106 return Shell::GetInstance()->display_manager()->IsActiveDisplayId(display_id); |
| 100 } | 107 } |
| 101 | 108 |
| 102 bool WmShellAura::IsForceMaximizeOnFirstRun() { | 109 bool WmShellAura::IsForceMaximizeOnFirstRun() { |
| 103 return delegate()->IsForceMaximizeOnFirstRun(); | 110 return delegate()->IsForceMaximizeOnFirstRun(); |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 254 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
| 248 OnDisplayConfigurationChanging()); | 255 OnDisplayConfigurationChanging()); |
| 249 } | 256 } |
| 250 | 257 |
| 251 void WmShellAura::OnDisplayConfigurationChanged() { | 258 void WmShellAura::OnDisplayConfigurationChanged() { |
| 252 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 259 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
| 253 OnDisplayConfigurationChanged()); | 260 OnDisplayConfigurationChanged()); |
| 254 } | 261 } |
| 255 | 262 |
| 256 } // namespace ash | 263 } // namespace ash |
| OLD | NEW |