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

Side by Side Diff: ash/shell.h

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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
« no previous file with comments | « ash/shelf/shelf_widget_unittest.cc ('k') | ash/shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 static void DeleteInstance(); 184 static void DeleteInstance();
185 185
186 // Returns the root window controller for the primary root window. 186 // Returns the root window controller for the primary root window.
187 // TODO(oshima): move this to |RootWindowController| 187 // TODO(oshima): move this to |RootWindowController|
188 static internal::RootWindowController* GetPrimaryRootWindowController(); 188 static internal::RootWindowController* GetPrimaryRootWindowController();
189 189
190 // Returns all root window controllers. 190 // Returns all root window controllers.
191 // TODO(oshima): move this to |RootWindowController| 191 // TODO(oshima): move this to |RootWindowController|
192 static RootWindowControllerList GetAllRootWindowControllers(); 192 static RootWindowControllerList GetAllRootWindowControllers();
193 193
194 // Returns the primary RootWindow. The primary RootWindow is the one 194 // Returns the primary root Window. The primary root Window is the one that
195 // that has a launcher. 195 // has a launcher.
196 static aura::RootWindow* GetPrimaryRootWindow(); 196 static aura::Window* GetPrimaryRootWindow();
197 197
198 // Returns a RootWindow when used as a target when creating a new window. 198 // Returns a root Window when used as a target when creating a new window.
199 // The root window of the active window is used in most cases, but can 199 // The root window of the active window is used in most cases, but can
200 // be overridden by using ScopedTargetRootWindow(). 200 // be overridden by using ScopedTargetRootWindow().
201 // If you want to get a RootWindow of the active window, just use 201 // If you want to get the root Window of the active window, just use
202 // |wm::GetActiveWindow()->GetRootWindow()|. 202 // |wm::GetActiveWindow()->GetRootWindow()|.
203 static aura::RootWindow* GetTargetRootWindow(); 203 static aura::Window* GetTargetRootWindow();
204 204
205 // Returns the global Screen object that's always active in ash. 205 // Returns the global Screen object that's always active in ash.
206 static gfx::Screen* GetScreen(); 206 static gfx::Screen* GetScreen();
207 207
208 // Returns all root windows. 208 // Returns all root windows.
209 static RootWindowList GetAllRootWindows(); 209 static RootWindowList GetAllRootWindows();
210 210
211 static aura::Window* GetContainer(aura::RootWindow* root_window, 211 static aura::Window* GetContainer(aura::Window* root_window,
212 int container_id); 212 int container_id);
213 static const aura::Window* GetContainer(const aura::RootWindow* root_window, 213 static const aura::Window* GetContainer(const aura::Window* root_window,
214 int container_id); 214 int container_id);
215 215
216 // Returns the list of containers that match |container_id| in 216 // Returns the list of containers that match |container_id| in
217 // all root windows. If |priority_root| is given, the container 217 // all root windows. If |priority_root| is given, the container
218 // in the |priority_root| will be inserted at the top of the list. 218 // in the |priority_root| will be inserted at the top of the list.
219 static std::vector<aura::Window*> GetContainersFromAllRootWindows( 219 static std::vector<aura::Window*> GetContainersFromAllRootWindows(
220 int container_id, 220 int container_id,
221 aura::RootWindow* priority_root); 221 aura::Window* priority_root);
222 222
223 void set_target_root_window(aura::RootWindow* target_root_window) { 223 void set_target_root_window(aura::Window* target_root_window) {
224 target_root_window_ = target_root_window; 224 target_root_window_ = target_root_window;
225 } 225 }
226 226
227 // Shows the context menu for the background and launcher at 227 // Shows the context menu for the background and launcher at
228 // |location_in_screen| (in screen coordinates). 228 // |location_in_screen| (in screen coordinates).
229 void ShowContextMenu(const gfx::Point& location_in_screen, 229 void ShowContextMenu(const gfx::Point& location_in_screen,
230 ui::MenuSourceType source_type); 230 ui::MenuSourceType source_type);
231 231
232 // Toggles the app list. |window| specifies in which display the app 232 // Toggles the app list. |window| specifies in which display the app
233 // list should be shown. If this is NULL, the active root window 233 // list should be shown. If this is NULL, the active root window
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 ScreenAsh* screen() { return screen_; } 403 ScreenAsh* screen() { return screen_; }
404 404
405 // Force the shelf to query for it's current visibility state. 405 // Force the shelf to query for it's current visibility state.
406 void UpdateShelfVisibility(); 406 void UpdateShelfVisibility();
407 407
408 // TODO(oshima): Define an interface to access shelf/launcher 408 // TODO(oshima): Define an interface to access shelf/launcher
409 // state, or just use Launcher. 409 // state, or just use Launcher.
410 410
411 // Sets/gets the shelf auto-hide behavior on |root_window|. 411 // Sets/gets the shelf auto-hide behavior on |root_window|.
412 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, 412 void SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
413 aura::RootWindow* root_window); 413 aura::Window* root_window);
414 ShelfAutoHideBehavior GetShelfAutoHideBehavior( 414 ShelfAutoHideBehavior GetShelfAutoHideBehavior(
415 aura::RootWindow* root_window) const; 415 aura::Window* root_window) const;
416 416
417 // Sets/gets shelf's alignment on |root_window|. 417 // Sets/gets shelf's alignment on |root_window|.
418 void SetShelfAlignment(ShelfAlignment alignment, 418 void SetShelfAlignment(ShelfAlignment alignment,
419 aura::RootWindow* root_window); 419 aura::Window* root_window);
420 ShelfAlignment GetShelfAlignment(aura::RootWindow* root_window); 420 ShelfAlignment GetShelfAlignment(aura::Window* root_window);
421 421
422 // Dims or undims the screen. 422 // Dims or undims the screen.
423 void SetDimming(bool should_dim); 423 void SetDimming(bool should_dim);
424 424
425 // Notifies |observers_| when entering or exiting fullscreen mode in 425 // Notifies |observers_| when entering or exiting fullscreen mode in
426 // |root_window|. 426 // |root_window|.
427 void NotifyFullscreenStateChange(bool is_fullscreen, 427 void NotifyFullscreenStateChange(bool is_fullscreen,
428 aura::RootWindow* root_window); 428 aura::Window* root_window);
429 429
430 // Creates a modal background (a partially-opaque fullscreen window) 430 // Creates a modal background (a partially-opaque fullscreen window)
431 // on all displays for |window|. 431 // on all displays for |window|.
432 void CreateModalBackground(aura::Window* window); 432 void CreateModalBackground(aura::Window* window);
433 433
434 // Called when a modal window is removed. It will activate 434 // Called when a modal window is removed. It will activate
435 // another modal window if any, or remove modal screens 435 // another modal window if any, or remove modal screens
436 // on all displays. 436 // on all displays.
437 void OnModalWindowRemoved(aura::Window* removed); 437 void OnModalWindowRemoved(aura::Window* removed);
438 438
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // If set before the Shell is initialized, the mouse cursor will be hidden 559 // If set before the Shell is initialized, the mouse cursor will be hidden
560 // when the screen is initially created. 560 // when the screen is initially created.
561 static bool initially_hide_cursor_; 561 static bool initially_hide_cursor_;
562 562
563 ScreenAsh* screen_; 563 ScreenAsh* screen_;
564 564
565 // When no explicit target display/RootWindow is given, new windows are 565 // When no explicit target display/RootWindow is given, new windows are
566 // created on |scoped_target_root_window_| , unless NULL in 566 // created on |scoped_target_root_window_| , unless NULL in
567 // which case they are created on |target_root_window_|. 567 // which case they are created on |target_root_window_|.
568 // |target_root_window_| never becomes NULL during the session. 568 // |target_root_window_| never becomes NULL during the session.
569 aura::RootWindow* target_root_window_; 569 aura::Window* target_root_window_;
570 aura::RootWindow* scoped_target_root_window_; 570 aura::Window* scoped_target_root_window_;
571 571
572 // The CompoundEventFilter owned by aura::Env object. 572 // The CompoundEventFilter owned by aura::Env object.
573 scoped_ptr<views::corewm::CompoundEventFilter> env_filter_; 573 scoped_ptr<views::corewm::CompoundEventFilter> env_filter_;
574 574
575 std::vector<WindowAndBoundsPair> to_restore_; 575 std::vector<WindowAndBoundsPair> to_restore_;
576 576
577 scoped_ptr<keyboard::KeyboardController> keyboard_controller_; 577 scoped_ptr<keyboard::KeyboardController> keyboard_controller_;
578 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; 578 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_;
579 scoped_ptr<AcceleratorController> accelerator_controller_; 579 scoped_ptr<AcceleratorController> accelerator_controller_;
580 scoped_ptr<ShellDelegate> delegate_; 580 scoped_ptr<ShellDelegate> delegate_;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 bool simulate_modal_window_open_for_testing_; 682 bool simulate_modal_window_open_for_testing_;
683 683
684 bool is_touch_hud_projection_enabled_; 684 bool is_touch_hud_projection_enabled_;
685 685
686 DISALLOW_COPY_AND_ASSIGN(Shell); 686 DISALLOW_COPY_AND_ASSIGN(Shell);
687 }; 687 };
688 688
689 } // namespace ash 689 } // namespace ash
690 690
691 #endif // ASH_SHELL_H_ 691 #endif // ASH_SHELL_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_widget_unittest.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698