OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/maximize_mode/maximize_mode_window_manager.h" | 5 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/maximize_mode/maximize_mode_window_state.h" | 10 #include "ash/wm/maximize_mode/maximize_mode_window_state.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 if (!IsContainerWindow(window)) | 101 if (!IsContainerWindow(window)) |
102 return; | 102 return; |
103 // Reposition all non maximizeable windows. | 103 // Reposition all non maximizeable windows. |
104 for (WindowToState::iterator it = window_state_map_.begin(); | 104 for (WindowToState::iterator it = window_state_map_.begin(); |
105 it != window_state_map_.end(); | 105 it != window_state_map_.end(); |
106 ++it) { | 106 ++it) { |
107 it->second->UpdateWindowPosition(wm::GetWindowState(it->first), false); | 107 it->second->UpdateWindowPosition(wm::GetWindowState(it->first), false); |
108 } | 108 } |
109 } | 109 } |
110 | 110 |
111 void MaximizeModeWindowManager::OnDisplayBoundsChanged( | |
112 const gfx::Display& display) { | |
113 // Nothing to do here. | |
114 } | |
115 | |
116 void MaximizeModeWindowManager::OnDisplayAdded(const gfx::Display& display) { | 111 void MaximizeModeWindowManager::OnDisplayAdded(const gfx::Display& display) { |
117 DisplayConfigurationChanged(); | 112 DisplayConfigurationChanged(); |
118 } | 113 } |
119 | 114 |
120 void MaximizeModeWindowManager::OnDisplayRemoved(const gfx::Display& display) { | 115 void MaximizeModeWindowManager::OnDisplayRemoved(const gfx::Display& display) { |
121 DisplayConfigurationChanged(); | 116 DisplayConfigurationChanged(); |
122 } | 117 } |
123 | 118 |
| 119 void MaximizeModeWindowManager::OnDisplayMetricsChanged( |
| 120 const gfx::Display&, DisplayObserver::DisplayMetrics) { |
| 121 // Nothing to do here. |
| 122 } |
| 123 |
124 MaximizeModeWindowManager::MaximizeModeWindowManager() | 124 MaximizeModeWindowManager::MaximizeModeWindowManager() |
125 : backdrops_hidden_(false) { | 125 : backdrops_hidden_(false) { |
126 // The overview mode needs to be ended before the maximize mode is started. To | 126 // The overview mode needs to be ended before the maximize mode is started. To |
127 // guarantee the proper order, it will be turned off from here. | 127 // guarantee the proper order, it will be turned off from here. |
128 CancelOverview(); | 128 CancelOverview(); |
129 | 129 |
130 MaximizeAllWindows(); | 130 MaximizeAllWindows(); |
131 AddWindowCreationObservers(); | 131 AddWindowCreationObservers(); |
132 EnableBackdropBehindTopWindowOnEachDisplay(true); | 132 EnableBackdropBehindTopWindowOnEachDisplay(true); |
133 Shell::GetInstance()->OnMaximizeModeStarted(); | 133 Shell::GetInstance()->OnMaximizeModeStarted(); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 RootWindowController* controller = *iter; | 233 RootWindowController* controller = *iter; |
234 aura::Window* container = Shell::GetContainer( | 234 aura::Window* container = Shell::GetContainer( |
235 controller->GetRootWindow(), kShellWindowId_DefaultContainer); | 235 controller->GetRootWindow(), kShellWindowId_DefaultContainer); |
236 controller->workspace_controller()->SetMaximizeBackdropDelegate( | 236 controller->workspace_controller()->SetMaximizeBackdropDelegate( |
237 scoped_ptr<WorkspaceLayoutManagerDelegate>( | 237 scoped_ptr<WorkspaceLayoutManagerDelegate>( |
238 enable ? new WorkspaceBackdropDelegate(container) : NULL)); | 238 enable ? new WorkspaceBackdropDelegate(container) : NULL)); |
239 } | 239 } |
240 } | 240 } |
241 | 241 |
242 } // namespace ash | 242 } // namespace ash |
OLD | NEW |