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

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

Issue 1151133003: Added an ActivationReason parameter to ActivationChangeObserver::OnWindowActivated(...). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded diff based on dependant CL. Created 5 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
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/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
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
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
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager.h ('k') | chrome/browser/ui/ash/launcher/app_window_launcher_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698