Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Side by Side Diff: athena/screen/public/screen_manager.h

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « athena/screen/public/DEPS ('k') | athena/screen/screen_accelerator_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_PUBLIC_SCREEN_MANAGER_H_
6 #define ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_
7
8 #include <string>
9
10 #include "athena/athena_export.h"
11 #include "ui/gfx/display.h"
12
13 namespace aura {
14 class Window;
15 }
16
17 namespace athena {
18 class ScreenManagerDelegate;
19
20 // Mananges basic UI components on the screen such as background, and provide
21 // API for other UI components, such as window manager, home card, to
22 // create and manage their windows on the screen.
23 class ATHENA_EXPORT ScreenManager {
24 public:
25 struct ContainerParams {
26 ContainerParams(const std::string& name, int z_order_priority);
27 std::string name;
28
29 // True if the container can activate its child window.
30 bool can_activate_children;
31
32 // True if the container will block evnets from containers behind it.
33 bool block_events;
34
35 // Defines the z_order priority of the container.
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.)
45 //
46 // Default is -1, and it will fallback to the container behind this
47 // container,
48 // that has the modal container proiroty.
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
54 // described above. (fallback to containers behind this).
55 // 2.b) If aura::client::kAlwaysOnTopKey is set, it searches the top most
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;
63 };
64
65 // Creates, returns and deletes the singleton object of the ScreenManager
66 // implementation.
67 static ScreenManager* Create(aura::Window* root);
68 static ScreenManager* Get();
69 static void Shutdown();
70
71 virtual ~ScreenManager() {}
72
73 // Creates the container window on the screen.
74 virtual aura::Window* CreateContainer(const ContainerParams& params) = 0;
75
76 // Return the context object to be used for widget creation.
77 virtual aura::Window* GetContext() = 0;
78
79 // Set screen rotation.
80 // TODO(flackr): Extract and use ash DisplayManager to set rotation
81 // instead: http://crbug.com/401044.
82 virtual void SetRotation(gfx::Display::Rotation rotation) = 0;
83 virtual void SetRotationLocked(bool rotation_locked) = 0;
84 };
85
86 } // namespace athena
87
88 #endif // ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_
OLDNEW
« no previous file with comments | « athena/screen/public/DEPS ('k') | athena/screen/screen_accelerator_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698