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

Side by Side Diff: ash/shell.h

Issue 11093050: Move shelf/launcher/status_area_widget/panel_layout_manager to RootWindowController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | 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_SHELL_H_ 5 #ifndef ASH_SHELL_H_
6 #define ASH_SHELL_H_ 6 #define ASH_SHELL_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 class AppListController; 83 class AppListController;
84 class CaptureController; 84 class CaptureController;
85 class DragDropController; 85 class DragDropController;
86 class EventClientImpl; 86 class EventClientImpl;
87 class EventRewriterEventFilter; 87 class EventRewriterEventFilter;
88 class FocusCycler; 88 class FocusCycler;
89 class MagnificationController; 89 class MagnificationController;
90 class MouseCursorEventFilter; 90 class MouseCursorEventFilter;
91 class OutputConfiguratorAnimation; 91 class OutputConfiguratorAnimation;
92 class OverlayEventFilter; 92 class OverlayEventFilter;
93 class PanelLayoutManager;
94 class ResizeShadowController; 93 class ResizeShadowController;
95 class RootWindowController; 94 class RootWindowController;
96 class RootWindowLayoutManager; 95 class RootWindowLayoutManager;
97 class ScreenPositionController; 96 class ScreenPositionController;
98 class ShadowController; 97 class ShadowController;
99 class ShelfLayoutManager; 98 class ShelfLayoutManager;
100 class ShellContextMenu; 99 class ShellContextMenu;
101 class SlowAnimationEventFilter; 100 class SlowAnimationEventFilter;
102 class StackingController; 101 class StackingController;
103 class StatusAreaWidget; 102 class StatusAreaWidget;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 175
177 static aura::Window* GetContainer(aura::RootWindow* root_window, 176 static aura::Window* GetContainer(aura::RootWindow* root_window,
178 int container_id); 177 int container_id);
179 static const aura::Window* GetContainer(const aura::RootWindow* root_window, 178 static const aura::Window* GetContainer(const aura::RootWindow* root_window,
180 int container_id); 179 int container_id);
181 180
182 // Returns the list of containers that match |container_id| in 181 // Returns the list of containers that match |container_id| in
183 // all root windows. 182 // all root windows.
184 static std::vector<aura::Window*> GetAllContainers(int container_id); 183 static std::vector<aura::Window*> GetAllContainers(int container_id);
185 184
185 // True if multiple launchers is enabled.
186 static bool IsMultipleLaunchersEnabled();
sky 2012/10/11 16:38:25 areMultipleLauncherEnabled
oshima 2012/10/11 20:19:51 Changed to IsLauncherPerDisplayEnabled. Is this ok
187
186 void set_active_root_window(aura::RootWindow* active_root_window) { 188 void set_active_root_window(aura::RootWindow* active_root_window) {
187 active_root_window_ = active_root_window; 189 active_root_window_ = active_root_window;
188 } 190 }
189 191
190 // Adds or removes |filter| from the aura::Env's pre-target event-handler 192 // Adds or removes |filter| from the aura::Env's pre-target event-handler
191 // list. 193 // list.
192 void AddEnvEventFilter(aura::EventFilter* filter); 194 void AddEnvEventFilter(aura::EventFilter* filter);
193 void RemoveEnvEventFilter(aura::EventFilter* filter); 195 void RemoveEnvEventFilter(aura::EventFilter* filter);
194 196
195 // Shows the background menu over |widget|. 197 // Shows the background menu over |widget|.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 302 }
301 303
302 HighContrastController* high_contrast_controller() { 304 HighContrastController* high_contrast_controller() {
303 return high_contrast_controller_.get(); 305 return high_contrast_controller_.get();
304 } 306 }
305 307
306 internal::MagnificationController* magnification_controller() { 308 internal::MagnificationController* magnification_controller() {
307 return magnification_controller_.get(); 309 return magnification_controller_.get();
308 } 310 }
309 311
310 Launcher* launcher() { return launcher_.get(); } 312 Launcher* launcher();
sky 2012/10/11 16:38:25 This is now dangerous. Can we remove it? If it's t
oshima 2012/10/11 20:19:51 I'm going to remove these methods from Shell in su
311 313
312 const ScreenAsh* screen() { return screen_; } 314 const ScreenAsh* screen() { return screen_; }
313 315
314 // Force the shelf to query for it's current visibility state. 316 // Force the shelf to query for it's current visibility state.
315 void UpdateShelfVisibility(); 317 void UpdateShelfVisibility();
316 318
317 // Sets/gets the shelf auto-hide behavior. 319 // Sets/gets the shelf auto-hide behavior.
318 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior); 320 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior);
319 ShelfAutoHideBehavior GetShelfAutoHideBehavior() const; 321 ShelfAutoHideBehavior GetShelfAutoHideBehavior() const;
320 322
321 void SetShelfAlignment(ShelfAlignment alignment); 323 void SetShelfAlignment(ShelfAlignment alignment);
322 ShelfAlignment GetShelfAlignment(); 324 ShelfAlignment GetShelfAlignment();
323 325
324 // Dims or undims the screen. 326 // Dims or undims the screen.
325 void SetDimming(bool should_dim); 327 void SetDimming(bool should_dim);
326 328
327 // Creates modal background, which is a partially-opaque fullscreen 329 // Creates modal background, which is a partially-opaque fullscreen
328 // window, on all displays. 330 // window, on all displays.
329 void CreateModalBackground(); 331 void CreateModalBackground();
330 332
331 // Called when a modal window is removed. It will activate 333 // Called when a modal window is removed. It will activate
332 // another modal window if any, or remove modal screens 334 // another modal window if any, or remove modal screens
333 // on all displays. 335 // on all displays.
334 void OnModalWindowRemoved(aura::Window* removed); 336 void OnModalWindowRemoved(aura::Window* removed);
335 337
336 // TODO(sky): don't expose this! 338 // TODO(sky): don't expose this!
337 internal::ShelfLayoutManager* shelf() const { return shelf_; } 339 internal::ShelfLayoutManager* shelf() const;
338 340
339 internal::StatusAreaWidget* status_area_widget() const { 341 internal::StatusAreaWidget* status_area_widget() const;
340 return status_area_widget_;
341 }
342 342
343 // Convenience accessor for members of StatusAreaWidget. 343 // Convenience accessor for members of StatusAreaWidget.
344 SystemTrayDelegate* tray_delegate(); 344 SystemTrayDelegate* tray_delegate();
345 SystemTray* system_tray(); 345 SystemTray* system_tray();
346 346
347 static void set_initially_hide_cursor(bool hide) { 347 static void set_initially_hide_cursor(bool hide) {
348 initially_hide_cursor_ = hide; 348 initially_hide_cursor_ = hide;
349 } 349 }
350 350
351 internal::ResizeShadowController* resize_shadow_controller() { 351 internal::ResizeShadowController* resize_shadow_controller() {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 #if !defined(OS_MACOSX) 425 #if !defined(OS_MACOSX)
426 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; 426 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_;
427 427
428 scoped_ptr<AcceleratorController> accelerator_controller_; 428 scoped_ptr<AcceleratorController> accelerator_controller_;
429 #endif // !defined(OS_MACOSX) 429 #endif // !defined(OS_MACOSX)
430 430
431 scoped_ptr<ShellDelegate> delegate_; 431 scoped_ptr<ShellDelegate> delegate_;
432 scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_; 432 scoped_ptr<UserWallpaperDelegate> user_wallpaper_delegate_;
433 scoped_ptr<CapsLockDelegate> caps_lock_delegate_; 433 scoped_ptr<CapsLockDelegate> caps_lock_delegate_;
434 434
435 scoped_ptr<Launcher> launcher_;
436
437 scoped_ptr<internal::AppListController> app_list_controller_; 435 scoped_ptr<internal::AppListController> app_list_controller_;
438 436
439 scoped_ptr<internal::ShellContextMenu> shell_context_menu_; 437 scoped_ptr<internal::ShellContextMenu> shell_context_menu_;
440 scoped_ptr<internal::StackingController> stacking_controller_; 438 scoped_ptr<internal::StackingController> stacking_controller_;
441 scoped_ptr<internal::ActivationController> activation_controller_; 439 scoped_ptr<internal::ActivationController> activation_controller_;
442 scoped_ptr<internal::CaptureController> capture_controller_; 440 scoped_ptr<internal::CaptureController> capture_controller_;
443 scoped_ptr<internal::WindowModalityController> window_modality_controller_; 441 scoped_ptr<internal::WindowModalityController> window_modality_controller_;
444 scoped_ptr<internal::DragDropController> drag_drop_controller_; 442 scoped_ptr<internal::DragDropController> drag_drop_controller_;
445 scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_; 443 scoped_ptr<internal::ResizeShadowController> resize_shadow_controller_;
446 scoped_ptr<internal::ShadowController> shadow_controller_; 444 scoped_ptr<internal::ShadowController> shadow_controller_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 484
487 #if defined(OS_CHROMEOS) 485 #if defined(OS_CHROMEOS)
488 // Controls video output device state. 486 // Controls video output device state.
489 scoped_ptr<chromeos::OutputConfigurator> output_configurator_; 487 scoped_ptr<chromeos::OutputConfigurator> output_configurator_;
490 scoped_ptr<internal::OutputConfiguratorAnimation> 488 scoped_ptr<internal::OutputConfiguratorAnimation>
491 output_configurator_animation_; 489 output_configurator_animation_;
492 #endif // defined(OS_CHROMEOS) 490 #endif // defined(OS_CHROMEOS)
493 491
494 CursorManager cursor_manager_; 492 CursorManager cursor_manager_;
495 493
496 // The shelf for managing the launcher and the status widget in non-compact
497 // mode. Shell does not own the shelf. Instead, it is owned by container of
498 // the status area.
499 internal::ShelfLayoutManager* shelf_;
500
501 // Manages layout of panels. Owned by PanelContainer.
502 internal::PanelLayoutManager* panel_layout_manager_;
503
504 ObserverList<ShellObserver> observers_; 494 ObserverList<ShellObserver> observers_;
505 495
506 // Widget containing system tray.
507 internal::StatusAreaWidget* status_area_widget_;
508
509 // Used by ash/shell. 496 // Used by ash/shell.
510 content::BrowserContext* browser_context_; 497 content::BrowserContext* browser_context_;
511 498
512 DISALLOW_COPY_AND_ASSIGN(Shell); 499 DISALLOW_COPY_AND_ASSIGN(Shell);
513 }; 500 };
514 501
515 } // namespace ash 502 } // namespace ash
516 503
517 #endif // ASH_SHELL_H_ 504 #endif // ASH_SHELL_H_
OLDNEW
« ash/root_window_controller.cc ('K') | « ash/root_window_controller.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698