OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/wm/public/window_manager.h" | 5 #include "athena/wm/public/window_manager.h" |
6 | 6 |
| 7 #include "athena/home/public/home_card.h" |
7 #include "athena/screen/public/screen_manager.h" | 8 #include "athena/screen/public/screen_manager.h" |
8 #include "athena/wm/window_overview_mode.h" | 9 #include "athena/wm/window_overview_mode.h" |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
10 #include "ui/aura/layout_manager.h" | 11 #include "ui/aura/layout_manager.h" |
11 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
12 #include "ui/wm/public/window_types.h" | 13 #include "ui/wm/public/window_types.h" |
13 | 14 |
14 namespace athena { | 15 namespace athena { |
15 namespace { | 16 namespace { |
16 | 17 |
(...skipping 13 matching lines...) Expand all Loading... |
30 else | 31 else |
31 overview_ = WindowOverviewMode::Create(container_.get(), this); | 32 overview_ = WindowOverviewMode::Create(container_.get(), this); |
32 } | 33 } |
33 | 34 |
34 private: | 35 private: |
35 // WindowOverviewModeDelegate: | 36 // WindowOverviewModeDelegate: |
36 virtual void OnSelectWindow(aura::Window* window) OVERRIDE { | 37 virtual void OnSelectWindow(aura::Window* window) OVERRIDE { |
37 CHECK_EQ(container_.get(), window->parent()); | 38 CHECK_EQ(container_.get(), window->parent()); |
38 container_->StackChildAtTop(window); | 39 container_->StackChildAtTop(window); |
39 overview_.reset(); | 40 overview_.reset(); |
| 41 |
| 42 HomeCard::Get()->SetState(HomeCard::VISIBLE_MINIMIZED); |
40 } | 43 } |
41 | 44 |
42 // aura::WindowObserver | 45 // aura::WindowObserver |
43 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE { | 46 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE { |
44 if (window == container_) | 47 if (window == container_) |
45 container_.reset(); | 48 container_.reset(); |
46 } | 49 } |
47 | 50 |
48 scoped_ptr<aura::Window> container_; | 51 scoped_ptr<aura::Window> container_; |
49 scoped_ptr<ui::EventHandler> temp_handler_; | 52 scoped_ptr<ui::EventHandler> temp_handler_; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 return instance; | 144 return instance; |
142 } | 145 } |
143 | 146 |
144 // static | 147 // static |
145 void WindowManager::Shutdown() { | 148 void WindowManager::Shutdown() { |
146 DCHECK(instance); | 149 DCHECK(instance); |
147 delete instance; | 150 delete instance; |
148 DCHECK(!instance); | 151 DCHECK(!instance); |
149 } | 152 } |
150 | 153 |
| 154 // static |
| 155 WindowManager* WindowManager::GetInstance() { |
| 156 DCHECK(instance); |
| 157 return instance; |
| 158 } |
| 159 |
151 } // namespace athena | 160 } // namespace athena |
OLD | NEW |