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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 if (root_window_ == window) { | 238 if (root_window_ == window) { |
239 const wm::WMEvent wm_event(wm::WM_EVENT_DISPLAY_BOUNDS_CHANGED); | 239 const wm::WMEvent wm_event(wm::WM_EVENT_DISPLAY_BOUNDS_CHANGED); |
240 AdjustAllWindowsBoundsForWorkAreaChange(&wm_event); | 240 AdjustAllWindowsBoundsForWorkAreaChange(&wm_event); |
241 } | 241 } |
242 } | 242 } |
243 | 243 |
244 ////////////////////////////////////////////////////////////////////////////// | 244 ////////////////////////////////////////////////////////////////////////////// |
245 // WorkspaceLayoutManager, | 245 // WorkspaceLayoutManager, |
246 // aura::client::ActivationChangeObserver implementation: | 246 // aura::client::ActivationChangeObserver implementation: |
247 | 247 |
248 void WorkspaceLayoutManager::OnWindowActivated(aura::Window* gained_active, | 248 void WorkspaceLayoutManager::OnWindowActivated( |
249 aura::Window* lost_active) { | 249 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 250 aura::Window* gained_active, |
| 251 aura::Window* lost_active) { |
250 wm::WindowState* window_state = wm::GetWindowState(gained_active); | 252 wm::WindowState* window_state = wm::GetWindowState(gained_active); |
251 if (window_state && window_state->IsMinimized() && | 253 if (window_state && window_state->IsMinimized() && |
252 !gained_active->IsVisible()) { | 254 !gained_active->IsVisible()) { |
253 window_state->Unminimize(); | 255 window_state->Unminimize(); |
254 DCHECK(!window_state->IsMinimized()); | 256 DCHECK(!window_state->IsMinimized()); |
255 } | 257 } |
256 UpdateFullscreenState(); | 258 UpdateFullscreenState(); |
257 UpdateShelfVisibility(); | 259 UpdateShelfVisibility(); |
258 } | 260 } |
259 | 261 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 bool is_fullscreen = GetRootWindowController( | 324 bool is_fullscreen = GetRootWindowController( |
323 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; | 325 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; |
324 if (is_fullscreen != is_fullscreen_) { | 326 if (is_fullscreen != is_fullscreen_) { |
325 ash::Shell::GetInstance()->NotifyFullscreenStateChange( | 327 ash::Shell::GetInstance()->NotifyFullscreenStateChange( |
326 is_fullscreen, window_->GetRootWindow()); | 328 is_fullscreen, window_->GetRootWindow()); |
327 is_fullscreen_ = is_fullscreen; | 329 is_fullscreen_ = is_fullscreen; |
328 } | 330 } |
329 } | 331 } |
330 | 332 |
331 } // namespace ash | 333 } // namespace ash |
OLD | NEW |