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

Side by Side Diff: ui/aura_shell/workspace/workspace_controller.h

Issue 8430024: Add WorkspaceObserver to observe changes in workspace state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update comments Created 9 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 | « ui/aura_shell/workspace/workspace.cc ('k') | ui/aura_shell/workspace/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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 UI_AURA_SHELL_WORKSPACE_WORKSPACE_CONTROLLER_H_ 5 #ifndef UI_AURA_SHELL_WORKSPACE_WORKSPACE_CONTROLLER_H_
6 #define UI_AURA_SHELL_WORKSPACE_WORKSPACE_CONTROLLER_H_ 6 #define UI_AURA_SHELL_WORKSPACE_WORKSPACE_CONTROLLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/aura/desktop_observer.h" 10 #include "ui/aura/desktop_observer.h"
(...skipping 10 matching lines...) Expand all
21 namespace aura_shell { 21 namespace aura_shell {
22 namespace internal { 22 namespace internal {
23 23
24 class DefaultContainerLayoutManager; 24 class DefaultContainerLayoutManager;
25 class WorkspaceManager; 25 class WorkspaceManager;
26 26
27 // WorkspaceControlls owns a WorkspaceManager. WorkspaceControlls bridges 27 // WorkspaceControlls owns a WorkspaceManager. WorkspaceControlls bridges
28 // events From DesktopObserver translating them to WorkspaceManager. 28 // events From DesktopObserver translating them to WorkspaceManager.
29 class AURA_SHELL_EXPORT WorkspaceController : public aura::DesktopObserver { 29 class AURA_SHELL_EXPORT WorkspaceController : public aura::DesktopObserver {
30 public: 30 public:
31 explicit WorkspaceController(aura::Window* window); 31 explicit WorkspaceController(aura::Window* workspace_viewport);
32 virtual ~WorkspaceController(); 32 virtual ~WorkspaceController();
33 33
34 void ToggleOverview(); 34 void ToggleOverview();
35 35
36 internal::DefaultContainerLayoutManager* layout_manager() { 36 // Returns the workspace manager that this controler owns.
37 return layout_manager_; 37 WorkspaceManager* workspace_manager() {
38 return workspace_manager_.get();
38 } 39 }
39 40
40 // DesktopObserver overrides: 41 // DesktopObserver overrides:
41 virtual void OnDesktopResized(const gfx::Size& new_size) OVERRIDE; 42 virtual void OnDesktopResized(const gfx::Size& new_size) OVERRIDE;
42 virtual void OnActiveWindowChanged(aura::Window* active) OVERRIDE; 43 virtual void OnActiveWindowChanged(aura::Window* active) OVERRIDE;
43 44
44 private: 45 private:
45 scoped_ptr<WorkspaceManager> workspace_manager_; 46 scoped_ptr<WorkspaceManager> workspace_manager_;
46 47
47 // This is owned by the window it's installed on.
48 internal::DefaultContainerLayoutManager* layout_manager_;
49
50 DISALLOW_COPY_AND_ASSIGN(WorkspaceController); 48 DISALLOW_COPY_AND_ASSIGN(WorkspaceController);
51 }; 49 };
52 50
53 } // namespace internal 51 } // namespace internal
54 } // namespace aura_shell 52 } // namespace aura_shell
55 53
56 #endif // UI_AURA_SHELL_WORKSPACE_WORKSPACE_CONTROLLER_H_ 54 #endif // UI_AURA_SHELL_WORKSPACE_WORKSPACE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/workspace/workspace.cc ('k') | ui/aura_shell/workspace/workspace_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698