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

Side by Side Diff: ash/wm/base_layout_manager.cc

Issue 23874013: Remove old activation code and disable-focus-controller flags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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/base_layout_manager.h" 5 #include "ash/wm/base_layout_manager.h"
6 6
7 #include "ash/screen_ash.h" 7 #include "ash/screen_ash.h"
8 #include "ash/session_state_delegate.h" 8 #include "ash/session_state_delegate.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 const gfx::Rect& new_bounds) { 147 const gfx::Rect& new_bounds) {
148 if (root_window_ == window) 148 if (root_window_ == window)
149 AdjustAllWindowsBoundsForWorkAreaChange(ADJUST_WINDOW_DISPLAY_SIZE_CHANGED); 149 AdjustAllWindowsBoundsForWorkAreaChange(ADJUST_WINDOW_DISPLAY_SIZE_CHANGED);
150 } 150 }
151 151
152 ////////////////////////////////////////////////////////////////////////////// 152 //////////////////////////////////////////////////////////////////////////////
153 // BaseLayoutManager, aura::client::ActivationChangeObserver implementation: 153 // BaseLayoutManager, aura::client::ActivationChangeObserver implementation:
154 154
155 void BaseLayoutManager::OnWindowActivated(aura::Window* gained_active, 155 void BaseLayoutManager::OnWindowActivated(aura::Window* gained_active,
156 aura::Window* lost_active) { 156 aura::Window* lost_active) {
157 if (views::corewm::UseFocusController()) { 157 if (gained_active && wm::IsWindowMinimized(gained_active) &&
158 if (gained_active && wm::IsWindowMinimized(gained_active) && 158 !gained_active->IsVisible()) {
159 !gained_active->IsVisible()) { 159 gained_active->Show();
160 gained_active->Show(); 160 DCHECK(!wm::IsWindowMinimized(gained_active));
161 DCHECK(!wm::IsWindowMinimized(gained_active));
162 }
163 } 161 }
164 } 162 }
165 163
166 ////////////////////////////////////////////////////////////////////////////// 164 //////////////////////////////////////////////////////////////////////////////
167 // BaseLayoutManager, protected: 165 // BaseLayoutManager, protected:
168 166
169 void BaseLayoutManager::ShowStateChanged(aura::Window* window, 167 void BaseLayoutManager::ShowStateChanged(aura::Window* window,
170 ui::WindowShowState last_show_state) { 168 ui::WindowShowState last_show_state) {
171 if (wm::IsWindowMinimized(window)) { 169 if (wm::IsWindowMinimized(window)) {
172 // Save the previous show state so that we can correctly restore it. 170 // Save the previous show state so that we can correctly restore it.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 window, ScreenAsh::GetDisplayBoundsInParent(window)); 263 window, ScreenAsh::GetDisplayBoundsInParent(window));
266 break; 264 break;
267 265
268 default: 266 default:
269 break; 267 break;
270 } 268 }
271 } 269 }
272 270
273 } // namespace internal 271 } // namespace internal
274 } // namespace ash 272 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698