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

Side by Side Diff: ash/wm/workspace_controller.h

Issue 2890733005: Refactor backdrop that is currently used in the maximized mode. (Closed)
Patch Set: fix memory issue in AshTouchExplorationManager Created 3 years, 7 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
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager_unittest.cc ('k') | ash/wm/workspace_controller.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_WM_WORKSPACE_CONTROLLER_H_ 5 #ifndef ASH_WM_WORKSPACE_CONTROLLER_H_
6 #define ASH_WM_WORKSPACE_CONTROLLER_H_ 6 #define ASH_WM_WORKSPACE_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/wm/workspace/workspace_types.h" 11 #include "ash/wm/workspace/workspace_types.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "ui/aura/window_observer.h" 13 #include "ui/aura/window_observer.h"
14 14
15 namespace ash { 15 namespace ash {
16 class WorkspaceEventHandler; 16 class WorkspaceEventHandler;
17 class WorkspaceLayoutManager; 17 class WorkspaceLayoutManager;
18 class WorkspaceLayoutManagerBackdropDelegate; 18 class BackdropDelegate;
19 19
20 namespace test { 20 namespace test {
21 class WorkspaceControllerTestApi; 21 class WorkspaceControllerTestApi;
22 } 22 }
23 23
24 // WorkspaceController acts as a central place that ties together all the 24 // WorkspaceController acts as a central place that ties together all the
25 // various workspace pieces. 25 // various workspace pieces.
26 class ASH_EXPORT WorkspaceController : public aura::WindowObserver { 26 class ASH_EXPORT WorkspaceController : public aura::WindowObserver {
27 public: 27 public:
28 // Installs WorkspaceLayoutManager on |viewport|. 28 // Installs WorkspaceLayoutManager on |viewport|.
29 explicit WorkspaceController(aura::Window* viewport); 29 explicit WorkspaceController(aura::Window* viewport);
30 ~WorkspaceController() override; 30 ~WorkspaceController() override;
31 31
32 // Returns the current window state. 32 // Returns the current window state.
33 wm::WorkspaceWindowState GetWindowState() const; 33 wm::WorkspaceWindowState GetWindowState() const;
34 34
35 // Starts the animation that occurs on first login. 35 // Starts the animation that occurs on first login.
36 void DoInitialAnimation(); 36 void DoInitialAnimation();
37 37
38 // Add a delegate which adds a backdrop behind the top window of the default 38 // Add a delegate which adds a backdrop behind the top window of the default
39 // workspace. 39 // workspace.
40 void SetMaximizeBackdropDelegate( 40 void SetBackdropDelegate(std::unique_ptr<BackdropDelegate> delegate);
41 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> delegate);
42 41
43 WorkspaceLayoutManager* layout_manager() { return layout_manager_; } 42 WorkspaceLayoutManager* layout_manager() { return layout_manager_; }
44 43
45 private: 44 private:
46 friend class test::WorkspaceControllerTestApi; 45 friend class test::WorkspaceControllerTestApi;
47 46
48 // aura::WindowObserver: 47 // aura::WindowObserver:
49 void OnWindowDestroying(aura::Window* window) override; 48 void OnWindowDestroying(aura::Window* window) override;
50 49
51 aura::Window* viewport_; 50 aura::Window* viewport_;
52 std::unique_ptr<WorkspaceEventHandler> event_handler_; 51 std::unique_ptr<WorkspaceEventHandler> event_handler_;
53 52
54 // Owned by |viewport_|. 53 // Owned by |viewport_|.
55 WorkspaceLayoutManager* layout_manager_; 54 WorkspaceLayoutManager* layout_manager_;
56 55
57 DISALLOW_COPY_AND_ASSIGN(WorkspaceController); 56 DISALLOW_COPY_AND_ASSIGN(WorkspaceController);
58 }; 57 };
59 58
60 } // namespace ash 59 } // namespace ash
61 60
62 #endif // ASH_WM_WORKSPACE_CONTROLLER_H_ 61 #endif // ASH_WM_WORKSPACE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager_unittest.cc ('k') | ash/wm/workspace_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698