| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |