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" |
(...skipping 11 matching lines...) Expand all Loading... | |
22 // create and manage their windows on the screen. | 22 // create and manage their windows on the screen. |
23 class ATHENA_EXPORT ScreenManager { | 23 class ATHENA_EXPORT ScreenManager { |
24 public: | 24 public: |
25 struct ContainerParams { | 25 struct ContainerParams { |
26 ContainerParams(const std::string& name, int z_order_priority); | 26 ContainerParams(const std::string& name, int z_order_priority); |
27 std::string name; | 27 std::string name; |
28 | 28 |
29 // True if the container can activate its child window. | 29 // True if the container can activate its child window. |
30 bool can_activate_children; | 30 bool can_activate_children; |
31 | 31 |
32 // True if the container will grab all of input events. | 32 // True if the container will block evnets from containers behind it. |
pkotwicz
2014/10/20 14:54:51
evnets -> events
| |
33 bool grab_inputs; | 33 bool block_events; |
34 | 34 |
35 // Defines the z_order priority of the container. | 35 // Defines the z_order priority of the container. |
36 int z_order_priority; | 36 int z_order_priority; |
37 | |
38 // True if this container should be used as a default parent. | |
39 bool default_parent; | |
40 | |
41 // The container priority used to open modal dialog window | |
42 // created with this container as a transient parent (Note: A modal window | |
43 // should | |
44 // use a trnasient parent, not a direct parent, or no transient parent.) | |
pkotwicz
2014/10/20 14:54:51
trnasient -> transient
| |
45 // | |
46 // Default is -1, and it will fallback to the container behind this | |
47 // container, | |
48 // that has the modal container proiroty. | |
pkotwicz
2014/10/20 14:54:51
proiroty -> priority
| |
49 // | |
50 // The modal container for modal window is selected as follows. | |
51 // 1) a window must be created with |aura::client::kModalKey| property | |
52 // without explicit parent set. | |
53 // 2.a) If aura::client::kAlwaysOnTopKey is NOT set, it uses the stand flow | |
pkotwicz
2014/10/20 14:54:51
stand -> standard ?
Random comment: I would have
| |
54 // described above. (fallback to containers behind this). | |
55 // 2.b) If aura::client::kAlwaysOnTopKey is set, it searches the top most | |
pkotwicz
2014/10/20 14:54:51
top most -> topmost
| |
56 // container which has |modal_container_priority| != -1. | |
57 // 3) Look for the container with |modal_container_priority|, and create | |
58 // one if it doesn't exist. | |
59 // | |
60 // Created modal container will self destruct if last modal window | |
61 // is deleted. | |
62 int modal_container_priority; | |
37 }; | 63 }; |
38 | 64 |
39 // Creates, returns and deletes the singleton object of the ScreenManager | 65 // Creates, returns and deletes the singleton object of the ScreenManager |
40 // implementation. | 66 // implementation. |
41 static ScreenManager* Create(aura::Window* root); | 67 static ScreenManager* Create(aura::Window* root); |
42 static ScreenManager* Get(); | 68 static ScreenManager* Get(); |
43 static void Shutdown(); | 69 static void Shutdown(); |
44 | 70 |
45 virtual ~ScreenManager() {} | 71 virtual ~ScreenManager() {} |
46 | 72 |
47 // Creates the container window that is used when creating a normal | |
48 // widget without specific parent. | |
49 virtual aura::Window* CreateDefaultContainer( | |
50 const ContainerParams& params) = 0; | |
51 | |
52 // Creates the container window on the screen. | 73 // Creates the container window on the screen. |
53 virtual aura::Window* CreateContainer(const ContainerParams& params) = 0; | 74 virtual aura::Window* CreateContainer(const ContainerParams& params) = 0; |
54 | 75 |
55 // Return the context object to be used for widget creation. | 76 // Return the context object to be used for widget creation. |
56 virtual aura::Window* GetContext() = 0; | 77 virtual aura::Window* GetContext() = 0; |
57 | 78 |
58 // Set screen rotation. | 79 // Set screen rotation. |
59 // TODO(flackr): Extract and use ash DisplayManager to set rotation | 80 // TODO(flackr): Extract and use ash DisplayManager to set rotation |
60 // instead: http://crbug.com/401044. | 81 // instead: http://crbug.com/401044. |
61 virtual void SetRotation(gfx::Display::Rotation rotation) = 0; | 82 virtual void SetRotation(gfx::Display::Rotation rotation) = 0; |
62 virtual void SetRotationLocked(bool rotation_locked) = 0; | 83 virtual void SetRotationLocked(bool rotation_locked) = 0; |
63 }; | 84 }; |
64 | 85 |
65 } // namespace athena | 86 } // namespace athena |
66 | 87 |
67 #endif // ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_ | 88 #endif // ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_ |
OLD | NEW |