| 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/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/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/wm/window_animations.h" | 10 #include "ash/wm/window_animations.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 aura::Window* lost_active) { | 157 aura::Window* lost_active) { |
| 158 if (views::corewm::UseFocusController()) { | 158 if (views::corewm::UseFocusController()) { |
| 159 if (gained_active && wm::IsWindowMinimized(gained_active) && | 159 if (gained_active && wm::IsWindowMinimized(gained_active) && |
| 160 !gained_active->IsVisible()) { | 160 !gained_active->IsVisible()) { |
| 161 gained_active->Show(); | 161 gained_active->Show(); |
| 162 DCHECK(!wm::IsWindowMinimized(gained_active)); | 162 DCHECK(!wm::IsWindowMinimized(gained_active)); |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 | 166 |
| 167 void BaseLayoutManager::OnWindowActivationRequestCompleted( |
| 168 aura::Window* request_active, aura::Window* actual_active) { |
| 169 } |
| 170 |
| 167 ////////////////////////////////////////////////////////////////////////////// | 171 ////////////////////////////////////////////////////////////////////////////// |
| 168 // BaseLayoutManager, private: | 172 // BaseLayoutManager, private: |
| 169 | 173 |
| 170 void BaseLayoutManager::ShowStateChanged(aura::Window* window, | 174 void BaseLayoutManager::ShowStateChanged(aura::Window* window, |
| 171 ui::WindowShowState last_show_state) { | 175 ui::WindowShowState last_show_state) { |
| 172 if (wm::IsWindowMinimized(window)) { | 176 if (wm::IsWindowMinimized(window)) { |
| 173 // Save the previous show state so that we can correctly restore it. | 177 // Save the previous show state so that we can correctly restore it. |
| 174 window->SetProperty(internal::kRestoreShowStateKey, last_show_state); | 178 window->SetProperty(internal::kRestoreShowStateKey, last_show_state); |
| 175 views::corewm::SetWindowVisibilityAnimationType( | 179 views::corewm::SetWindowVisibilityAnimationType( |
| 176 window, WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE); | 180 window, WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // Put as much of the window as possible within the display area. | 249 // Put as much of the window as possible within the display area. |
| 246 gfx::Rect bounds = window->bounds(); | 250 gfx::Rect bounds = window->bounds(); |
| 247 bounds.AdjustToFit(display_rect); | 251 bounds.AdjustToFit(display_rect); |
| 248 window->SetBounds(bounds); | 252 window->SetBounds(bounds); |
| 249 } | 253 } |
| 250 } | 254 } |
| 251 } | 255 } |
| 252 | 256 |
| 253 } // namespace internal | 257 } // namespace internal |
| 254 } // namespace ash | 258 } // namespace ash |
| OLD | NEW |