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

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

Issue 662763002: Support modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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
OLDNEW
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
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.
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 from this container. Default is -1, and it will fallback
43 // to the container behind this container, that has the modal container
44 // proiroty.
45 //
46 // The modal container for modal window is selected as follows.
47 // 1) a window must be created with |aura::client::kModalKey| property
48 // without explicit parent set.
49 // 2.a) If aura::client::kAlwaysOnTopKey is set, it searches the top most
50 // container which has |modal_container_priority| != -1.
51 // 2.b) If aura::client::kAlwaysOnTopKey is NOT set, it searches the
52 // container that has |modal_container_priority| != -1 downwards,
53 // starting from this container.
Jun Mukai 2014/10/17 17:29:54 I am not sure starting from which container. Can
oshima 2014/10/17 18:20:04 Updated the comment.
54 // 3) Look for the container with |modal_container_priority|, and create
55 // one if it doesn't exist.
56 //
57 // Created modal container will self destruct if last modal window
58 // is deleted.
59 int modal_container_priority;
37 }; 60 };
38 61
39 // Creates, returns and deletes the singleton object of the ScreenManager 62 // Creates, returns and deletes the singleton object of the ScreenManager
40 // implementation. 63 // implementation.
41 static ScreenManager* Create(aura::Window* root); 64 static ScreenManager* Create(aura::Window* root);
42 static ScreenManager* Get(); 65 static ScreenManager* Get();
43 static void Shutdown(); 66 static void Shutdown();
44 67
45 virtual ~ScreenManager() {} 68 virtual ~ScreenManager() {}
46 69
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. 70 // Creates the container window on the screen.
53 virtual aura::Window* CreateContainer(const ContainerParams& params) = 0; 71 virtual aura::Window* CreateContainer(const ContainerParams& params) = 0;
54 72
55 // Return the context object to be used for widget creation. 73 // Return the context object to be used for widget creation.
56 virtual aura::Window* GetContext() = 0; 74 virtual aura::Window* GetContext() = 0;
57 75
58 // Set screen rotation. 76 // Set screen rotation.
59 // TODO(flackr): Extract and use ash DisplayManager to set rotation 77 // TODO(flackr): Extract and use ash DisplayManager to set rotation
60 // instead: http://crbug.com/401044. 78 // instead: http://crbug.com/401044.
61 virtual void SetRotation(gfx::Display::Rotation rotation) = 0; 79 virtual void SetRotation(gfx::Display::Rotation rotation) = 0;
62 virtual void SetRotationLocked(bool rotation_locked) = 0; 80 virtual void SetRotationLocked(bool rotation_locked) = 0;
63 }; 81 };
64 82
65 } // namespace athena 83 } // namespace athena
66 84
67 #endif // ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_ 85 #endif // ATHENA_SCREEN_PUBLIC_SCREEN_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698