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

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

Issue 2024993002: Makes RootWindowController window creation in terms of common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk 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/wm/common/wm_window_property.h ('k') | mash/wm/bridge/wm_globals_mus.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/wm/common/workspace/workspace_layout_manager.h" 5 #include "ash/wm/common/workspace/workspace_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/wm/common/always_on_top_controller.h" 9 #include "ash/wm/common/always_on_top_controller.h"
10 #include "ash/wm/common/fullscreen_window_finder.h" 10 #include "ash/wm/common/fullscreen_window_finder.h"
(...skipping 19 matching lines...) Expand all
30 root_window_(window->GetRootWindow()), 30 root_window_(window->GetRootWindow()),
31 root_window_controller_(root_window_->GetRootWindowController()), 31 root_window_controller_(root_window_->GetRootWindowController()),
32 globals_(window_->GetGlobals()), 32 globals_(window_->GetGlobals()),
33 delegate_(std::move(delegate)), 33 delegate_(std::move(delegate)),
34 work_area_in_parent_(wm::GetDisplayWorkAreaBounds(window_)), 34 work_area_in_parent_(wm::GetDisplayWorkAreaBounds(window_)),
35 is_fullscreen_(wm::GetWindowForFullscreenMode(window) != nullptr) { 35 is_fullscreen_(wm::GetWindowForFullscreenMode(window) != nullptr) {
36 globals_->AddActivationObserver(this); 36 globals_->AddActivationObserver(this);
37 root_window_->AddObserver(this); 37 root_window_->AddObserver(this);
38 root_window_controller_->AddObserver(this); 38 root_window_controller_->AddObserver(this);
39 DCHECK(window->GetBoolProperty( 39 DCHECK(window->GetBoolProperty(
40 wm::WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUDARY)); 40 wm::WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUNDARY));
41 } 41 }
42 42
43 WorkspaceLayoutManager::~WorkspaceLayoutManager() { 43 WorkspaceLayoutManager::~WorkspaceLayoutManager() {
44 if (root_window_) 44 if (root_window_)
45 root_window_->RemoveObserver(this); 45 root_window_->RemoveObserver(this);
46 for (wm::WmWindow* window : windows_) 46 for (wm::WmWindow* window : windows_)
47 window->RemoveObserver(this); 47 window->RemoveObserver(this);
48 root_window_->GetRootWindowController()->RemoveObserver(this); 48 root_window_->GetRootWindowController()->RemoveObserver(this);
49 globals_->RemoveActivationObserver(this); 49 globals_->RemoveActivationObserver(this);
50 } 50 }
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 if (!delegate_) 322 if (!delegate_)
323 return; 323 return;
324 bool is_fullscreen = GetWindowForFullscreenMode(window_) != nullptr; 324 bool is_fullscreen = GetWindowForFullscreenMode(window_) != nullptr;
325 if (is_fullscreen != is_fullscreen_) { 325 if (is_fullscreen != is_fullscreen_) {
326 delegate_->OnFullscreenStateChanged(is_fullscreen); 326 delegate_->OnFullscreenStateChanged(is_fullscreen);
327 is_fullscreen_ = is_fullscreen; 327 is_fullscreen_ = is_fullscreen;
328 } 328 }
329 } 329 }
330 330
331 } // namespace ash 331 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/common/wm_window_property.h ('k') | mash/wm/bridge/wm_globals_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698