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

Side by Side Diff: ash/common/wm/workspace/workspace_layout_manager.cc

Issue 2041233004: mash: Move //ash/session to //ash/common/session (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/common/wm/container_finder.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/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
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
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
OLDNEW
« no previous file with comments | « ash/common/wm/container_finder.cc ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698