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

Side by Side Diff: ash/common/wm_root_window_controller.h

Issue 2318223003: mash: Migrate wallpaper controllers to ash/common. (Closed)
Patch Set: Fix nit. Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_ 5 #ifndef ASH_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_
6 #define ASH_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_ 6 #define ASH_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/wm/workspace/workspace_types.h" 9 #include "ash/common/wm/workspace/workspace_types.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/views/widget/widget.h" 11 #include "ui/views/widget/widget.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Point; 14 class Point;
15 } 15 }
16 16
17 namespace ash { 17 namespace ash {
18 18
19 class AlwaysOnTopController; 19 class AlwaysOnTopController;
20 class AnimatingWallpaperWidgetController;
21 class WallpaperWidgetController;
20 class WmShelf; 22 class WmShelf;
21 class WmShell; 23 class WmShell;
22 class WmWindow; 24 class WmWindow;
23 class WorkspaceController; 25 class WorkspaceController;
24 26
25 namespace wm { 27 namespace wm {
26 class RootWindowLayoutManager; 28 class RootWindowLayoutManager;
27 } 29 }
28 30
29 // Provides state associated with a root of a window hierarchy. 31 // Provides state associated with a root of a window hierarchy.
30 class ASH_EXPORT WmRootWindowController { 32 class ASH_EXPORT WmRootWindowController {
31 public: 33 public:
32 explicit WmRootWindowController(WmWindow* window); 34 explicit WmRootWindowController(WmWindow* window);
33 virtual ~WmRootWindowController(); 35 virtual ~WmRootWindowController();
34 36
35 wm::RootWindowLayoutManager* root_window_layout_manager() { 37 wm::RootWindowLayoutManager* root_window_layout_manager() {
36 return root_window_layout_manager_; 38 return root_window_layout_manager_;
37 } 39 }
38 40
41 WallpaperWidgetController* wallpaper_widget_controller() {
42 return wallpaper_widget_controller_.get();
43 }
44 void SetWallpaperWidgetController(WallpaperWidgetController* controller);
45
46 AnimatingWallpaperWidgetController* animating_wallpaper_widget_controller() {
47 return animating_wallpaper_widget_controller_.get();
48 }
49 void SetAnimatingWallpaperWidgetController(
50 AnimatingWallpaperWidgetController* controller);
51
39 WorkspaceController* workspace_controller() { 52 WorkspaceController* workspace_controller() {
40 return workspace_controller_.get(); 53 return workspace_controller_.get();
41 } 54 }
42 55
43 wm::WorkspaceWindowState GetWorkspaceWindowState(); 56 wm::WorkspaceWindowState GetWorkspaceWindowState();
44 57
45 virtual bool HasShelf() = 0; 58 virtual bool HasShelf() = 0;
46 59
47 virtual WmShell* GetShell() = 0; 60 virtual WmShell* GetShell() = 0;
48 61
(...skipping 15 matching lines...) Expand all
64 // (in screen coordinates). 77 // (in screen coordinates).
65 // 78 //
66 // NOTE: the returned window may not contain the location as resize handles 79 // NOTE: the returned window may not contain the location as resize handles
67 // may extend outside the bounds of the window. 80 // may extend outside the bounds of the window.
68 virtual WmWindow* FindEventTarget(const gfx::Point& location_in_screen) = 0; 81 virtual WmWindow* FindEventTarget(const gfx::Point& location_in_screen) = 0;
69 82
70 // Gets the last location seen in a mouse event in this root window's 83 // Gets the last location seen in a mouse event in this root window's
71 // coordinates. This may return a point outside the root window's bounds. 84 // coordinates. This may return a point outside the root window's bounds.
72 virtual gfx::Point GetLastMouseLocationInRoot() = 0; 85 virtual gfx::Point GetLastMouseLocationInRoot() = 0;
73 86
87 // Called when the wallpaper animation has started or finished.
88 // TODO: port remaining classic ash wallpaper functionality here.
89 virtual void OnInitialWallpaperAnimationStarted();
90 virtual void OnWallpaperAnimationFinished(views::Widget* widget);
91
74 protected: 92 protected:
75 // Creates the containers (WmWindows) used by the shell. 93 // Creates the containers (WmWindows) used by the shell.
76 void CreateContainers(); 94 void CreateContainers();
77 95
78 // Creates the LayoutManagers for the windows created by CreateContainers(). 96 // Creates the LayoutManagers for the windows created by CreateContainers().
79 void CreateLayoutManagers(); 97 void CreateLayoutManagers();
80 98
81 void DeleteWorkspaceController(); 99 void DeleteWorkspaceController();
82 100
83 private: 101 private:
84 WmWindow* root_; 102 WmWindow* root_;
85 103
86 wm::RootWindowLayoutManager* root_window_layout_manager_; 104 wm::RootWindowLayoutManager* root_window_layout_manager_;
87 105
106 std::unique_ptr<WallpaperWidgetController> wallpaper_widget_controller_;
107 std::unique_ptr<AnimatingWallpaperWidgetController>
108 animating_wallpaper_widget_controller_;
88 std::unique_ptr<WorkspaceController> workspace_controller_; 109 std::unique_ptr<WorkspaceController> workspace_controller_;
89 110
90 DISALLOW_COPY_AND_ASSIGN(WmRootWindowController); 111 DISALLOW_COPY_AND_ASSIGN(WmRootWindowController);
91 }; 112 };
92 113
93 } // namespace ash 114 } // namespace ash
94 115
95 #endif // ASH_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_ 116 #endif // ASH_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/common/wallpaper/wallpaper_widget_controller.cc ('k') | ash/common/wm_root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698