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/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" |
11 #include "ash/wm/window_animations.h" | 11 #include "ash/wm/window_animations.h" |
12 #include "ash/wm/window_properties.h" | 12 #include "ash/wm/window_properties.h" |
13 #include "ash/wm/window_state.h" | 13 #include "ash/wm/window_state.h" |
14 #include "ash/wm/window_util.h" | 14 #include "ash/wm/window_util.h" |
15 #include "ash/wm/workspace/workspace_window_resizer.h" | 15 #include "ash/wm/workspace/workspace_window_resizer.h" |
16 #include "ui/aura/client/activation_client.h" | 16 #include "ui/aura/client/activation_client.h" |
17 #include "ui/aura/client/aura_constants.h" | 17 #include "ui/aura/client/aura_constants.h" |
18 #include "ui/aura/root_window.h" | |
19 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
20 #include "ui/base/ui_base_types.h" | 19 #include "ui/base/ui_base_types.h" |
21 #include "ui/compositor/layer.h" | 20 #include "ui/compositor/layer.h" |
22 #include "ui/gfx/screen.h" | 21 #include "ui/gfx/screen.h" |
23 #include "ui/views/corewm/corewm_switches.h" | 22 #include "ui/views/corewm/corewm_switches.h" |
24 #include "ui/views/corewm/window_util.h" | 23 #include "ui/views/corewm/window_util.h" |
25 | 24 |
26 namespace ash { | 25 namespace ash { |
27 namespace internal { | 26 namespace internal { |
28 | 27 |
29 ///////////////////////////////////////////////////////////////////////////// | 28 ///////////////////////////////////////////////////////////////////////////// |
30 // BaseLayoutManager, public: | 29 // BaseLayoutManager, public: |
31 | 30 |
32 BaseLayoutManager::BaseLayoutManager(aura::RootWindow* root_window) | 31 BaseLayoutManager::BaseLayoutManager(aura::Window* root_window) |
33 : root_window_(root_window) { | 32 : root_window_(root_window) { |
34 Shell::GetInstance()->activation_client()->AddObserver(this); | 33 Shell::GetInstance()->activation_client()->AddObserver(this); |
35 Shell::GetInstance()->AddShellObserver(this); | 34 Shell::GetInstance()->AddShellObserver(this); |
36 root_window_->AddObserver(this); | 35 root_window_->AddObserver(this); |
37 } | 36 } |
38 | 37 |
39 BaseLayoutManager::~BaseLayoutManager() { | 38 BaseLayoutManager::~BaseLayoutManager() { |
40 if (root_window_) | 39 if (root_window_) |
41 root_window_->RemoveObserver(this); | 40 root_window_->RemoveObserver(this); |
42 for (WindowSet::const_iterator i = windows_.begin(); i != windows_.end(); ++i) | 41 for (WindowSet::const_iterator i = windows_.begin(); i != windows_.end(); ++i) |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 ScreenAsh::GetDisplayBoundsInParent(window)); | 269 ScreenAsh::GetDisplayBoundsInParent(window)); |
271 break; | 270 break; |
272 | 271 |
273 default: | 272 default: |
274 break; | 273 break; |
275 } | 274 } |
276 } | 275 } |
277 | 276 |
278 } // namespace internal | 277 } // namespace internal |
279 } // namespace ash | 278 } // namespace ash |
OLD | NEW |