Chromium Code Reviews| 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/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/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 UpdateShelfVisibility(); | 257 UpdateShelfVisibility(); |
| 258 } | 258 } |
| 259 | 259 |
| 260 ////////////////////////////////////////////////////////////////////////////// | 260 ////////////////////////////////////////////////////////////////////////////// |
| 261 // WorkspaceLayoutManager, wm::WindowStateObserver implementation: | 261 // WorkspaceLayoutManager, wm::WindowStateObserver implementation: |
| 262 | 262 |
| 263 void WorkspaceLayoutManager::OnPostWindowStateTypeChange( | 263 void WorkspaceLayoutManager::OnPostWindowStateTypeChange( |
| 264 wm::WindowState* window_state, | 264 wm::WindowState* window_state, |
| 265 wm::WindowStateType old_type) { | 265 wm::WindowStateType old_type) { |
| 266 | 266 |
| 267 if (window_state->IsDocked()) | |
| 268 wm::DockWindow(window_state->window()); | |
|
varkha
2014/10/01 19:08:51
I assume this can never get called when the window
dtapuska
2014/10/01 20:17:42
No I don't believe so. The listeners are removed w
| |
| 269 | |
| 267 // Notify observers that fullscreen state may be changing. | 270 // Notify observers that fullscreen state may be changing. |
| 268 if (window_state->IsFullscreen() || | 271 if (window_state->IsFullscreen() || |
| 269 old_type == wm::WINDOW_STATE_TYPE_FULLSCREEN) { | 272 old_type == wm::WINDOW_STATE_TYPE_FULLSCREEN) { |
| 270 UpdateFullscreenState(); | 273 UpdateFullscreenState(); |
| 271 } | 274 } |
| 272 | 275 |
| 273 UpdateShelfVisibility(); | 276 UpdateShelfVisibility(); |
| 274 if (backdrop_delegate_) | 277 if (backdrop_delegate_) |
| 275 backdrop_delegate_->OnPostWindowStateTypeChange(window_state, old_type); | 278 backdrop_delegate_->OnPostWindowStateTypeChange(window_state, old_type); |
| 276 } | 279 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 322 bool is_fullscreen = GetRootWindowController( | 325 bool is_fullscreen = GetRootWindowController( |
| 323 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; | 326 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; |
| 324 if (is_fullscreen != is_fullscreen_) { | 327 if (is_fullscreen != is_fullscreen_) { |
| 325 ash::Shell::GetInstance()->NotifyFullscreenStateChange( | 328 ash::Shell::GetInstance()->NotifyFullscreenStateChange( |
| 326 is_fullscreen, window_->GetRootWindow()); | 329 is_fullscreen, window_->GetRootWindow()); |
| 327 is_fullscreen_ = is_fullscreen; | 330 is_fullscreen_ = is_fullscreen; |
| 328 } | 331 } |
| 329 } | 332 } |
| 330 | 333 |
| 331 } // namespace ash | 334 } // namespace ash |
| OLD | NEW |