Chromium Code Reviews| 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 #ifndef ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_ | 5 #ifndef ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_ |
| 6 #define ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_ | 6 #define ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "athena/athena_export.h" | 10 #include "athena/athena_export.h" |
| 11 | 11 |
| 12 namespace aura { | 12 namespace aura { |
| 13 class Window; | 13 class Window; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 class ImageSkia; | 17 class ImageSkia; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace wm { | |
| 21 class FocusRules; | |
| 22 } | |
| 23 | |
| 20 namespace athena { | 24 namespace athena { |
| 21 | 25 |
| 22 // Mananges basic UI components on the screen such as background, and provide | 26 // Mananges basic UI components on the screen such as background, and provide |
| 23 // API for other UI components, such as window manager, home card, to | 27 // API for other UI components, such as window manager, home card, to |
| 24 // create and manage their windows on the screen. | 28 // create and manage their windows on the screen. |
| 25 class ATHENA_EXPORT ScreenManager { | 29 class ATHENA_EXPORT ScreenManager { |
| 26 public: | 30 public: |
| 31 struct ContainerParams { | |
|
James Cook
2014/07/18 02:39:51
I like how you use this params struct for initiali
| |
| 32 ContainerParams(const std::string& name); | |
| 33 std::string name; | |
| 34 | |
| 35 // True if the container can activate its child window. | |
| 36 bool can_activate_children; | |
| 37 }; | |
| 38 | |
| 27 // Creates, returns and deletes the singleton object of the ScreenManager | 39 // Creates, returns and deletes the singleton object of the ScreenManager |
| 28 // implementation. | 40 // implementation. |
| 29 static ScreenManager* Create(aura::Window* root); | 41 static ScreenManager* Create(aura::Window* root); |
| 30 static ScreenManager* Get(); | 42 static ScreenManager* Get(); |
| 31 static void Shutdown(); | 43 static void Shutdown(); |
| 32 | 44 |
| 33 virtual ~ScreenManager() {} | 45 virtual ~ScreenManager() {} |
| 34 | 46 |
| 35 // Creates the container window that is used when creating a normal | 47 // Creates the container window that is used when creating a normal |
| 36 // widget without specific parent. | 48 // widget without specific parent. |
| 37 virtual aura::Window* CreateDefaultContainer(const std::string& name) = 0; | 49 virtual aura::Window* CreateDefaultContainer( |
| 50 const ContainerParams& params) = 0; | |
| 38 | 51 |
| 39 // Creates the container window on the screen. | 52 // Creates the container window on the screen. |
| 40 virtual aura::Window* CreateContainer(const std::string& name) = 0; | 53 virtual aura::Window* CreateContainer(const ContainerParams& params) = 0; |
| 41 | 54 |
| 42 // Return the context object to be used for widget creation. | 55 // Return the context object to be used for widget creation. |
| 43 virtual aura::Window* GetContext() = 0; | 56 virtual aura::Window* GetContext() = 0; |
| 44 | 57 |
| 45 // Sets the background image. | 58 // Sets the background image. |
| 46 virtual void SetBackgroundImage(const gfx::ImageSkia& image) = 0; | 59 virtual void SetBackgroundImage(const gfx::ImageSkia& image) = 0; |
| 60 | |
| 61 // Create a focus rules. | |
| 62 // TODO(osima): Make this virtual function. | |
|
James Cook
2014/07/18 02:39:51
nit: osima -> oshima :-)
oshima
2014/07/18 04:03:52
Done.
| |
| 63 static wm::FocusRules* CreateFocusRules(); | |
|
oshima
2014/07/17 21:31:05
I need to refactor initialization process to make
James Cook
2014/07/18 02:39:51
Acknowledged.
| |
| 47 }; | 64 }; |
| 48 | 65 |
| 49 } // namespace athena | 66 } // namespace athena |
| 50 | 67 |
| 51 #endif // ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_ | 68 #endif // ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_ |
| OLD | NEW |