OLD | NEW |
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/common/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
| 9 #include "ash/common/session/session_state_delegate.h" |
9 #include "ash/common/wm/always_on_top_controller.h" | 10 #include "ash/common/wm/always_on_top_controller.h" |
10 #include "ash/common/wm/fullscreen_window_finder.h" | 11 #include "ash/common/wm/fullscreen_window_finder.h" |
11 #include "ash/common/wm/window_positioner.h" | 12 #include "ash/common/wm/window_positioner.h" |
12 #include "ash/common/wm/window_state.h" | 13 #include "ash/common/wm/window_state.h" |
13 #include "ash/common/wm/wm_event.h" | 14 #include "ash/common/wm/wm_event.h" |
14 #include "ash/common/wm/wm_screen_util.h" | 15 #include "ash/common/wm/wm_screen_util.h" |
15 #include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h" | 16 #include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h" |
16 #include "ash/common/wm/workspace/workspace_layout_manager_delegate.h" | 17 #include "ash/common/wm/workspace/workspace_layout_manager_delegate.h" |
17 #include "ash/common/wm_root_window_controller.h" | 18 #include "ash/common/wm_root_window_controller.h" |
18 #include "ash/common/wm_shell.h" | 19 #include "ash/common/wm_shell.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 const wm::WMEvent* event) { | 290 const wm::WMEvent* event) { |
290 DCHECK(event->type() == wm::WM_EVENT_DISPLAY_BOUNDS_CHANGED || | 291 DCHECK(event->type() == wm::WM_EVENT_DISPLAY_BOUNDS_CHANGED || |
291 event->type() == wm::WM_EVENT_WORKAREA_BOUNDS_CHANGED); | 292 event->type() == wm::WM_EVENT_WORKAREA_BOUNDS_CHANGED); |
292 | 293 |
293 work_area_in_parent_ = wm::GetDisplayWorkAreaBounds(window_); | 294 work_area_in_parent_ = wm::GetDisplayWorkAreaBounds(window_); |
294 | 295 |
295 // Don't do any adjustments of the insets while we are in screen locked mode. | 296 // Don't do any adjustments of the insets while we are in screen locked mode. |
296 // This would happen if the launcher was auto hidden before the login screen | 297 // This would happen if the launcher was auto hidden before the login screen |
297 // was shown and then gets shown when the login screen gets presented. | 298 // was shown and then gets shown when the login screen gets presented. |
298 if (event->type() == wm::WM_EVENT_WORKAREA_BOUNDS_CHANGED && | 299 if (event->type() == wm::WM_EVENT_WORKAREA_BOUNDS_CHANGED && |
299 shell_->IsScreenLocked()) | 300 shell_->GetSessionStateDelegate()->IsScreenLocked()) |
300 return; | 301 return; |
301 | 302 |
302 // If a user plugs an external display into a laptop running Aura the | 303 // If a user plugs an external display into a laptop running Aura the |
303 // display size will change. Maximized windows need to resize to match. | 304 // display size will change. Maximized windows need to resize to match. |
304 // We also do this when developers running Aura on a desktop manually resize | 305 // We also do this when developers running Aura on a desktop manually resize |
305 // the host window. | 306 // the host window. |
306 // We also need to do this when the work area insets changes. | 307 // We also need to do this when the work area insets changes. |
307 for (WmWindow* window : windows_) | 308 for (WmWindow* window : windows_) |
308 window->GetWindowState()->OnWMEvent(event); | 309 window->GetWindowState()->OnWMEvent(event); |
309 } | 310 } |
(...skipping 12 matching lines...) Expand all Loading... |
322 if (!delegate_) | 323 if (!delegate_) |
323 return; | 324 return; |
324 bool is_fullscreen = wm::GetWindowForFullscreenMode(window_) != nullptr; | 325 bool is_fullscreen = wm::GetWindowForFullscreenMode(window_) != nullptr; |
325 if (is_fullscreen != is_fullscreen_) { | 326 if (is_fullscreen != is_fullscreen_) { |
326 delegate_->OnFullscreenStateChanged(is_fullscreen); | 327 delegate_->OnFullscreenStateChanged(is_fullscreen); |
327 is_fullscreen_ = is_fullscreen; | 328 is_fullscreen_ = is_fullscreen; |
328 } | 329 } |
329 } | 330 } |
330 | 331 |
331 } // namespace ash | 332 } // namespace ash |
OLD | NEW |