OLD | NEW |
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> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 } | 120 } |
121 | 121 |
122 WmShelfAura* wm_shelf_aura() const { return wm_shelf_aura_.get(); } | 122 WmShelfAura* wm_shelf_aura() const { return wm_shelf_aura_.get(); } |
123 | 123 |
124 // Access the shelf widget associated with this root window controller, | 124 // Access the shelf widget associated with this root window controller, |
125 // NULL if no such shelf exists. | 125 // NULL if no such shelf exists. |
126 // DEPRECATED: Prefer GetShelf()->shelf_widget(). | 126 // DEPRECATED: Prefer GetShelf()->shelf_widget(). |
127 ShelfWidget* shelf_widget() { return shelf_widget_.get(); } | 127 ShelfWidget* shelf_widget() { return shelf_widget_.get(); } |
128 | 128 |
129 // Get touch HUDs associated with this root window controller. | 129 // Get touch HUDs associated with this root window controller. |
130 TouchHudDebug* touch_hud_debug() const { | 130 TouchHudDebug* touch_hud_debug() const { return touch_hud_debug_; } |
131 return touch_hud_debug_; | |
132 } | |
133 TouchHudProjection* touch_hud_projection() const { | 131 TouchHudProjection* touch_hud_projection() const { |
134 return touch_hud_projection_; | 132 return touch_hud_projection_; |
135 } | 133 } |
136 | 134 |
137 // Set touch HUDs for this root window controller. The root window controller | 135 // Set touch HUDs for this root window controller. The root window controller |
138 // will not own the HUDs; their lifetimes are managed by themselves. Whenever | 136 // will not own the HUDs; their lifetimes are managed by themselves. Whenever |
139 // the widget showing a HUD is being destroyed (e.g. because of detaching a | 137 // the widget showing a HUD is being destroyed (e.g. because of detaching a |
140 // display), the HUD deletes itself. | 138 // display), the HUD deletes itself. |
141 void set_touch_hud_debug(TouchHudDebug* hud) { | 139 void set_touch_hud_debug(TouchHudDebug* hud) { touch_hud_debug_ = hud; } |
142 touch_hud_debug_ = hud; | |
143 } | |
144 void set_touch_hud_projection(TouchHudProjection* hud) { | 140 void set_touch_hud_projection(TouchHudProjection* hud) { |
145 touch_hud_projection_ = hud; | 141 touch_hud_projection_ = hud; |
146 } | 142 } |
147 | 143 |
148 DesktopBackgroundWidgetController* wallpaper_controller() { | 144 DesktopBackgroundWidgetController* wallpaper_controller() { |
149 return wallpaper_controller_.get(); | 145 return wallpaper_controller_.get(); |
150 } | 146 } |
151 void SetWallpaperController(DesktopBackgroundWidgetController* controller); | 147 void SetWallpaperController(DesktopBackgroundWidgetController* controller); |
152 AnimatingDesktopController* animating_wallpaper_controller() { | 148 AnimatingDesktopController* animating_wallpaper_controller() { |
153 return animating_wallpaper_controller_.get(); | 149 return animating_wallpaper_controller_.get(); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 236 |
241 // Tests if a window is associated with the virtual keyboard. | 237 // Tests if a window is associated with the virtual keyboard. |
242 bool IsVirtualKeyboardWindow(aura::Window* window); | 238 bool IsVirtualKeyboardWindow(aura::Window* window); |
243 | 239 |
244 // If touch exploration is enabled, update the touch exploration | 240 // If touch exploration is enabled, update the touch exploration |
245 // controller so that synthesized touch events are anchored at this point. | 241 // controller so that synthesized touch events are anchored at this point. |
246 void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point); | 242 void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point); |
247 | 243 |
248 private: | 244 private: |
249 explicit RootWindowController(AshWindowTreeHost* host); | 245 explicit RootWindowController(AshWindowTreeHost* host); |
250 enum RootWindowType { | 246 enum RootWindowType { PRIMARY, SECONDARY }; |
251 PRIMARY, | |
252 SECONDARY | |
253 }; | |
254 | 247 |
255 // Initializes the RootWindowController. |is_primary| is true if | 248 // Initializes the RootWindowController. |is_primary| is true if |
256 // the controller is for primary display. |first_run_after_boot| is | 249 // the controller is for primary display. |first_run_after_boot| is |
257 // set to true only for primary root window after boot. | 250 // set to true only for primary root window after boot. |
258 void Init(RootWindowType root_window_type, bool first_run_after_boot); | 251 void Init(RootWindowType root_window_type, bool first_run_after_boot); |
259 | 252 |
260 void InitLayoutManagers(); | 253 void InitLayoutManagers(); |
261 | 254 |
262 // Initializes |system_background_| and possibly also |boot_splash_screen_|. | 255 // Initializes |system_background_| and possibly also |boot_splash_screen_|. |
263 // |is_first_run_after_boot| determines the background's initial color. | 256 // |is_first_run_after_boot| determines the background's initial color. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 | 330 |
338 // On classic ash, returns the RootWindowController for the given |root_window|. | 331 // On classic ash, returns the RootWindowController for the given |root_window|. |
339 // On mus ash, returns the RootWindowController for the primary display. | 332 // On mus ash, returns the RootWindowController for the primary display. |
340 // See RootWindowController class comment above. | 333 // See RootWindowController class comment above. |
341 ASH_EXPORT RootWindowController* GetRootWindowController( | 334 ASH_EXPORT RootWindowController* GetRootWindowController( |
342 const aura::Window* root_window); | 335 const aura::Window* root_window); |
343 | 336 |
344 } // namespace ash | 337 } // namespace ash |
345 | 338 |
346 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ | 339 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ |
OLD | NEW |