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

Side by Side Diff: ash/root_window_controller.h

Issue 17063013: Separate projection mode from rest of touch HUD (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed TouchHudDebug and applied some more reviews Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_ROOT_WINDOW_CONTROLLER_H_ 5 #ifndef ASH_ROOT_WINDOW_CONTROLLER_H_
6 #define ASH_ROOT_WINDOW_CONTROLLER_H_ 6 #define ASH_ROOT_WINDOW_CONTROLLER_H_
7 7
8 #include <map>
9
8 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
9 #include "ash/shelf/shelf_types.h" 11 #include "ash/shelf/shelf_types.h"
10 #include "ash/system/user/login_status.h" 12 #include "ash/system/user/login_status.h"
11 #include "base/basictypes.h" 13 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
13 #include "ui/base/ui_base_types.h" 15 #include "ui/base/ui_base_types.h"
14 16
15 class SkBitmap; 17 class SkBitmap;
16 18
17 namespace aura { 19 namespace aura {
(...skipping 27 matching lines...) Expand all
45 47
46 class BootSplashScreen; 48 class BootSplashScreen;
47 class DockedWindowLayoutManager; 49 class DockedWindowLayoutManager;
48 class PanelLayoutManager; 50 class PanelLayoutManager;
49 class RootWindowLayoutManager; 51 class RootWindowLayoutManager;
50 class ScreenDimmer; 52 class ScreenDimmer;
51 class ShelfLayoutManager; 53 class ShelfLayoutManager;
52 class StatusAreaWidget; 54 class StatusAreaWidget;
53 class SystemBackgroundController; 55 class SystemBackgroundController;
54 class SystemModalContainerLayoutManager; 56 class SystemModalContainerLayoutManager;
55 class TouchObserverHUD; 57 class TouchHudDebug;
58 class TouchHudProjection;
56 class WorkspaceController; 59 class WorkspaceController;
57 60
58 // This class maintains the per root window state for ash. This class 61 // This class maintains the per root window state for ash. This class
59 // owns the root window and other dependent objects that should be 62 // owns the root window and other dependent objects that should be
60 // deleted upon the deletion of the root window. The RootWindowController 63 // deleted upon the deletion of the root window. The RootWindowController
61 // for particular root window is stored as a property and can be obtained 64 // for particular root window is stored as a property and can be obtained
62 // using |GetRootWindowController(aura::RootWindow*)| function. 65 // using |GetRootWindowController(aura::RootWindow*)| function.
63 class ASH_EXPORT RootWindowController { 66 class ASH_EXPORT RootWindowController {
64 public: 67 public:
65 explicit RootWindowController(aura::RootWindow* root_window); 68 explicit RootWindowController(aura::RootWindow* root_window);
(...skipping 18 matching lines...) Expand all
84 WorkspaceController* workspace_controller() { 87 WorkspaceController* workspace_controller() {
85 return workspace_controller_.get(); 88 return workspace_controller_.get();
86 } 89 }
87 90
88 ScreenDimmer* screen_dimmer() { return screen_dimmer_.get(); } 91 ScreenDimmer* screen_dimmer() { return screen_dimmer_.get(); }
89 92
90 // Access the shelf associated with this root window controller, 93 // Access the shelf associated with this root window controller,
91 // NULL if no such shelf exists. 94 // NULL if no such shelf exists.
92 ShelfWidget* shelf() { return shelf_.get(); } 95 ShelfWidget* shelf() { return shelf_.get(); }
93 96
94 TouchObserverHUD* touch_observer_hud() { return touch_observer_hud_; } 97 // Get touch HUDs associated with this root window controller.
98 TouchHudDebug* touch_hud_debug() const {
99 return touch_hud_debug_;
100 }
101 TouchHudProjection* touch_hud_projection() const {
102 return touch_hud_projection_;
103 }
95 104
96 // Sets the touch HUD. The RootWindowController will not own this HUD; its 105 // Set touch HUDs for this root window controller. The root window controller
97 // lifetime is managed by itself. 106 // will not own the HUDs; their lifetimes are managed by themselves.
98 void set_touch_observer_hud(TouchObserverHUD* hud) { 107 void set_touch_hud_debug(TouchHudDebug* hud) {
99 touch_observer_hud_ = hud; 108 touch_hud_debug_ = hud;
100 } 109 }
110 void set_touch_hud_projection(TouchHudProjection* hud) {
sky 2013/06/26 21:07:44 Who owns hud and what happens to existing hud? Sam
mohsen 2013/06/27 00:44:31 The hud manages its own lifetime. When the widget
sky 2013/06/28 16:09:00 Document ownership here.
111 touch_hud_projection_ = hud;
112 }
113
114 // Enables projection touch HUD.
115 void EnableTouchHudProjection();
116
117 // Disables projection touch HUD.
118 void DisableTouchHudProjection();
119
101 // Access the shelf layout manager associated with this root 120 // Access the shelf layout manager associated with this root
102 // window controller, NULL if no such shelf exists. 121 // window controller, NULL if no such shelf exists.
103 ShelfLayoutManager* GetShelfLayoutManager(); 122 ShelfLayoutManager* GetShelfLayoutManager();
104 123
105 // Returns the system tray on this root window. Note that 124 // Returns the system tray on this root window. Note that
106 // calling this on the root window that doesn't have a launcher will 125 // calling this on the root window that doesn't have a launcher will
107 // lead to a crash. 126 // lead to a crash.
108 SystemTray* GetSystemTray(); 127 SystemTray* GetSystemTray();
109 128
110 // Shows context menu at the |location_in_screen|. This uses 129 // Shows context menu at the |location_in_screen|. This uses
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 184
166 // Deletes all child windows and performs necessary cleanup. 185 // Deletes all child windows and performs necessary cleanup.
167 void CloseChildWindows(); 186 void CloseChildWindows();
168 187
169 // Moves child windows to |dest|. 188 // Moves child windows to |dest|.
170 void MoveWindowsTo(aura::RootWindow* dest); 189 void MoveWindowsTo(aura::RootWindow* dest);
171 190
172 // Force the shelf to query for it's current visibility state. 191 // Force the shelf to query for it's current visibility state.
173 void UpdateShelfVisibility(); 192 void UpdateShelfVisibility();
174 193
194 // Initialize touch HUDs if necessary.
195 void InitTouchHuds();
sky 2013/06/26 21:07:44 Shouldn't this be private?
mohsen 2013/06/27 00:44:31 This function is called from Shell::InitRootWindow
196
175 // Returns the window, if any, which is in fullscreen mode in the active 197 // Returns the window, if any, which is in fullscreen mode in the active
176 // workspace. Exposed here so clients of Ash don't need to know the details 198 // workspace. Exposed here so clients of Ash don't need to know the details
177 // of workspace management. 199 // of workspace management.
178 aura::Window* GetFullscreenWindow() const; 200 aura::Window* GetFullscreenWindow() const;
179 201
180 private: 202 private:
181 // Creates each of the special window containers that holds windows of various 203 // Creates each of the special window containers that holds windows of various
182 // types in the shell UI. 204 // types in the shell UI.
183 void CreateContainersInRootWindow(aura::RootWindow* root_window); 205 void CreateContainersInRootWindow(aura::RootWindow* root_window);
184 206
(...skipping 15 matching lines...) Expand all
200 222
201 // Manages layout of panels. Owned by PanelContainer. 223 // Manages layout of panels. Owned by PanelContainer.
202 PanelLayoutManager* panel_layout_manager_; 224 PanelLayoutManager* panel_layout_manager_;
203 225
204 scoped_ptr<SystemBackgroundController> system_background_; 226 scoped_ptr<SystemBackgroundController> system_background_;
205 scoped_ptr<BootSplashScreen> boot_splash_screen_; 227 scoped_ptr<BootSplashScreen> boot_splash_screen_;
206 228
207 scoped_ptr<ScreenDimmer> screen_dimmer_; 229 scoped_ptr<ScreenDimmer> screen_dimmer_;
208 scoped_ptr<WorkspaceController> workspace_controller_; 230 scoped_ptr<WorkspaceController> workspace_controller_;
209 231
210 // Heads-up display for touch events. The RootWindowController does not own 232 // Heads-up displays for touch events. These HUDs are not owned by the root
211 // this HUD; its lifetime is managed by itself. 233 // window controller and manage their own lifetimes.
212 TouchObserverHUD* touch_observer_hud_; 234 TouchHudDebug* touch_hud_debug_;
235 TouchHudProjection* touch_hud_projection_;
213 236
214 // We need to own event handlers for various containers. 237 // We need to own event handlers for various containers.
215 scoped_ptr<ToplevelWindowEventHandler> default_container_handler_; 238 scoped_ptr<ToplevelWindowEventHandler> default_container_handler_;
216 scoped_ptr<ToplevelWindowEventHandler> always_on_top_container_handler_; 239 scoped_ptr<ToplevelWindowEventHandler> always_on_top_container_handler_;
217 scoped_ptr<ToplevelWindowEventHandler> modal_container_handler_; 240 scoped_ptr<ToplevelWindowEventHandler> modal_container_handler_;
218 scoped_ptr<ToplevelWindowEventHandler> lock_modal_container_handler_; 241 scoped_ptr<ToplevelWindowEventHandler> lock_modal_container_handler_;
219 scoped_ptr<ToplevelWindowEventHandler> panel_container_handler_; 242 scoped_ptr<ToplevelWindowEventHandler> panel_container_handler_;
220 scoped_ptr<ToplevelWindowEventHandler> docked_container_handler_; 243 scoped_ptr<ToplevelWindowEventHandler> docked_container_handler_;
221 244
222 DISALLOW_COPY_AND_ASSIGN(RootWindowController); 245 DISALLOW_COPY_AND_ASSIGN(RootWindowController);
223 }; 246 };
224 247
225 } // namespace internal 248 } // namespace internal
226 } // ash 249 } // ash
227 250
228 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ 251 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/root_window_controller.cc » ('j') | ash/shell.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698