| 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/screen/public/screen_manager.h" | 5 #include "athena/screen/public/screen_manager.h" |
| 6 | 6 |
| 7 #include "athena/input/public/accelerator_manager.h" | 7 #include "athena/input/public/accelerator_manager.h" |
| 8 #include "athena/screen/screen_accelerator_handler.h" | 8 #include "athena/screen/screen_accelerator_handler.h" |
| 9 #include "athena/util/container_priorities.h" | 9 #include "athena/util/container_priorities.h" |
| 10 #include "athena/util/fill_layout_manager.h" | 10 #include "athena/util/fill_layout_manager.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 void Init(); | 199 void Init(); |
| 200 | 200 |
| 201 private: | 201 private: |
| 202 // ScreenManager: | 202 // ScreenManager: |
| 203 virtual aura::Window* CreateDefaultContainer( | 203 virtual aura::Window* CreateDefaultContainer( |
| 204 const ContainerParams& params) OVERRIDE; | 204 const ContainerParams& params) OVERRIDE; |
| 205 virtual aura::Window* CreateContainer(const ContainerParams& params) OVERRIDE; | 205 virtual aura::Window* CreateContainer(const ContainerParams& params) OVERRIDE; |
| 206 virtual aura::Window* GetContext() OVERRIDE { return root_window_; } | 206 virtual aura::Window* GetContext() OVERRIDE { return root_window_; } |
| 207 virtual void SetRotation(gfx::Display::Rotation rotation) OVERRIDE; | 207 virtual void SetRotation(gfx::Display::Rotation rotation) OVERRIDE; |
| 208 virtual void SetRotationLocked(bool rotation_locked) OVERRIDE; | 208 virtual void SetRotationLocked(bool rotation_locked) OVERRIDE; |
| 209 virtual ui::LayerAnimator* GetScreenAnimator() OVERRIDE; | |
| 210 | 209 |
| 211 // Not owned. | 210 // Not owned. |
| 212 aura::Window* root_window_; | 211 aura::Window* root_window_; |
| 213 | 212 |
| 214 scoped_ptr<aura::client::FocusClient> focus_client_; | 213 scoped_ptr<aura::client::FocusClient> focus_client_; |
| 215 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; | 214 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; |
| 216 scoped_ptr<AcceleratorHandler> accelerator_handler_; | 215 scoped_ptr<AcceleratorHandler> accelerator_handler_; |
| 217 scoped_ptr< ::wm::ScopedCaptureClient> capture_client_; | 216 scoped_ptr< ::wm::ScopedCaptureClient> capture_client_; |
| 218 scoped_ptr<aura::client::ScreenPositionClient> screen_position_client_; | 217 scoped_ptr<aura::client::ScreenPositionClient> screen_position_client_; |
| 219 | 218 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 static_cast<aura::TestScreen*>(gfx::Screen::GetNativeScreen())-> | 354 static_cast<aura::TestScreen*>(gfx::Screen::GetNativeScreen())-> |
| 356 SetDisplayRotation(rotation); | 355 SetDisplayRotation(rotation); |
| 357 } | 356 } |
| 358 | 357 |
| 359 void ScreenManagerImpl::SetRotationLocked(bool rotation_locked) { | 358 void ScreenManagerImpl::SetRotationLocked(bool rotation_locked) { |
| 360 rotation_locked_ = rotation_locked; | 359 rotation_locked_ = rotation_locked; |
| 361 if (!rotation_locked_) | 360 if (!rotation_locked_) |
| 362 SetRotation(last_requested_rotation_); | 361 SetRotation(last_requested_rotation_); |
| 363 } | 362 } |
| 364 | 363 |
| 365 ui::LayerAnimator* ScreenManagerImpl::GetScreenAnimator() { | |
| 366 return root_window_->layer()->GetAnimator(); | |
| 367 } | |
| 368 | |
| 369 } // namespace | 364 } // namespace |
| 370 | 365 |
| 371 ScreenManager::ContainerParams::ContainerParams(const std::string& n, | 366 ScreenManager::ContainerParams::ContainerParams(const std::string& n, |
| 372 int priority) | 367 int priority) |
| 373 : name(n), | 368 : name(n), |
| 374 can_activate_children(false), | 369 can_activate_children(false), |
| 375 grab_inputs(false), | 370 grab_inputs(false), |
| 376 z_order_priority(priority) { | 371 z_order_priority(priority) { |
| 377 } | 372 } |
| 378 | 373 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 390 } | 385 } |
| 391 | 386 |
| 392 // static | 387 // static |
| 393 void ScreenManager::Shutdown() { | 388 void ScreenManager::Shutdown() { |
| 394 DCHECK(instance); | 389 DCHECK(instance); |
| 395 delete instance; | 390 delete instance; |
| 396 DCHECK(!instance); | 391 DCHECK(!instance); |
| 397 } | 392 } |
| 398 | 393 |
| 399 } // namespace athena | 394 } // namespace athena |
| OLD | NEW |