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

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

Issue 2808723004: Renames WmShell to ShellPort (Closed)
Patch Set: feedback Created 3 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
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/wm/workspace/workspace_layout_manager.h" 5 #include "ash/wm/workspace/workspace_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/keyboard/keyboard_observer_register.h" 9 #include "ash/keyboard/keyboard_observer_register.h"
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
11 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
12 #include "ash/session/session_controller.h" 12 #include "ash/session/session_controller.h"
13 #include "ash/shelf/wm_shelf.h" 13 #include "ash/shelf/wm_shelf.h"
14 #include "ash/shell.h" 14 #include "ash/shell.h"
15 #include "ash/wm/always_on_top_controller.h" 15 #include "ash/wm/always_on_top_controller.h"
16 #include "ash/wm/fullscreen_window_finder.h" 16 #include "ash/wm/fullscreen_window_finder.h"
17 #include "ash/wm/screen_pinning_controller.h" 17 #include "ash/wm/screen_pinning_controller.h"
18 #include "ash/wm/window_positioner.h" 18 #include "ash/wm/window_positioner.h"
19 #include "ash/wm/window_properties.h" 19 #include "ash/wm/window_properties.h"
20 #include "ash/wm/window_state.h" 20 #include "ash/wm/window_state.h"
21 #include "ash/wm/window_state_aura.h" 21 #include "ash/wm/window_state_aura.h"
22 #include "ash/wm/window_util.h" 22 #include "ash/wm/window_util.h"
23 #include "ash/wm/wm_event.h" 23 #include "ash/wm/wm_event.h"
24 #include "ash/wm/wm_screen_util.h" 24 #include "ash/wm/wm_screen_util.h"
25 #include "ash/wm/workspace/workspace_layout_manager_backdrop_delegate.h" 25 #include "ash/wm/workspace/workspace_layout_manager_backdrop_delegate.h"
26 #include "ash/wm_shell.h"
27 #include "ash/wm_window.h" 26 #include "ash/wm_window.h"
28 #include "base/command_line.h" 27 #include "base/command_line.h"
29 #include "ui/aura/client/aura_constants.h" 28 #include "ui/aura/client/aura_constants.h"
30 #include "ui/base/ui_base_switches.h" 29 #include "ui/base/ui_base_switches.h"
31 #include "ui/compositor/layer.h" 30 #include "ui/compositor/layer.h"
32 #include "ui/display/display.h" 31 #include "ui/display/display.h"
33 #include "ui/display/screen.h" 32 #include "ui/display/screen.h"
34 #include "ui/keyboard/keyboard_controller.h" 33 #include "ui/keyboard/keyboard_controller.h"
35 #include "ui/keyboard/keyboard_controller_observer.h" 34 #include "ui/keyboard/keyboard_controller_observer.h"
36 #include "ui/wm/public/activation_client.h" 35 #include "ui/wm/public/activation_client.h"
37 36
38 namespace ash { 37 namespace ash {
39 38
40 WorkspaceLayoutManager::WorkspaceLayoutManager(WmWindow* window) 39 WorkspaceLayoutManager::WorkspaceLayoutManager(WmWindow* window)
41 : window_(window), 40 : window_(window),
42 root_window_(window->GetRootWindow()), 41 root_window_(window->GetRootWindow()),
43 root_window_controller_(root_window_->GetRootWindowController()), 42 root_window_controller_(root_window_->GetRootWindowController()),
44 shell_(window_->GetShell()),
45 work_area_in_parent_(wm::GetDisplayWorkAreaBoundsInParent(window_)), 43 work_area_in_parent_(wm::GetDisplayWorkAreaBoundsInParent(window_)),
46 is_fullscreen_(wm::GetWindowForFullscreenMode(window) != nullptr), 44 is_fullscreen_(wm::GetWindowForFullscreenMode(window) != nullptr),
47 keyboard_observer_(this) { 45 keyboard_observer_(this) {
48 Shell::Get()->AddShellObserver(this); 46 Shell::Get()->AddShellObserver(this);
49 Shell::Get()->activation_client()->AddObserver(this); 47 Shell::Get()->activation_client()->AddObserver(this);
50 root_window_->aura_window()->AddObserver(this); 48 root_window_->aura_window()->AddObserver(this);
51 display::Screen::GetScreen()->AddObserver(this); 49 display::Screen::GetScreen()->AddObserver(this);
52 DCHECK(window->aura_window()->GetProperty(kSnapChildrenToPixelBoundary)); 50 DCHECK(window->aura_window()->GetProperty(kSnapChildrenToPixelBoundary));
53 } 51 }
54 52
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 for (auto* window : windows) { 392 for (auto* window : windows) {
395 wm::WindowState* window_state = window->GetWindowState(); 393 wm::WindowState* window_state = window->GetWindowState();
396 if (window_on_top) 394 if (window_on_top)
397 window_state->DisableAlwaysOnTop(window_on_top); 395 window_state->DisableAlwaysOnTop(window_on_top);
398 else 396 else
399 window_state->RestoreAlwaysOnTop(); 397 window_state->RestoreAlwaysOnTop();
400 } 398 }
401 } 399 }
402 400
403 } // namespace ash 401 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698