OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ATHENA_SCREEN_SCREEN_MANAGER_IMPL_H_ |
| 6 #define ATHENA_SCREEN_SCREEN_MANAGER_IMPL_H_ |
| 7 |
| 8 #include "athena/athena_export.h" |
| 9 #include "athena/screen/public/screen_manager.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "ui/aura/client/window_tree_client.h" |
| 12 |
| 13 namespace aura { |
| 14 namespace client { |
| 15 class FocusClient; |
| 16 class ScreenPositionClient; |
| 17 } |
| 18 } |
| 19 |
| 20 namespace wm { |
| 21 class ScopedCaptureClient; |
| 22 } |
| 23 |
| 24 namespace athena { |
| 25 class AcceleratorHandler; |
| 26 |
| 27 class ATHENA_EXPORT ScreenManagerImpl : public ScreenManager, |
| 28 public aura::client::WindowTreeClient { |
| 29 public: |
| 30 explicit ScreenManagerImpl(aura::Window* root_window); |
| 31 virtual ~ScreenManagerImpl(); |
| 32 |
| 33 void Init(); |
| 34 |
| 35 // Returns a container which has |priority|. Null if such container |
| 36 // doesn't exist. |
| 37 aura::Window* FindContainerByPriority(int priority); |
| 38 |
| 39 private: |
| 40 // ScreenManager: |
| 41 virtual aura::Window* CreateContainer(const ContainerParams& params) override; |
| 42 virtual aura::Window* GetContext() override; |
| 43 virtual void SetRotation(gfx::Display::Rotation rotation) override; |
| 44 virtual void SetRotationLocked(bool rotation_locked) override; |
| 45 |
| 46 // aura::client::WindowTreeClient: |
| 47 virtual aura::Window* GetDefaultParent(aura::Window* context, |
| 48 aura::Window* window, |
| 49 const gfx::Rect& bounds) override; |
| 50 |
| 51 int GetModalContainerPriority(aura::Window* window, aura::Window* parent); |
| 52 |
| 53 // Returns a container with |params.default_parent| == true. |
| 54 aura::Window* GetDefaultContainer(); |
| 55 |
| 56 // Not owned. |
| 57 aura::Window* root_window_; |
| 58 |
| 59 scoped_ptr<aura::client::FocusClient> focus_client_; |
| 60 scoped_ptr<AcceleratorHandler> accelerator_handler_; |
| 61 scoped_ptr<::wm::ScopedCaptureClient> capture_client_; |
| 62 scoped_ptr<aura::client::ScreenPositionClient> screen_position_client_; |
| 63 |
| 64 gfx::Display::Rotation last_requested_rotation_; |
| 65 bool rotation_locked_; |
| 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(ScreenManagerImpl); |
| 68 }; |
| 69 |
| 70 } // namespace athena |
| 71 |
| 72 #endif // ATHENA_SCREEN_SCREEN_MANAGER_IMPL_H_ |
OLD | NEW |