OLD | NEW |
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 ASH_WM_WORKSPACE_WORKSPACE_OBSERVER_H_ | 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_OBSERVER_H_ |
6 #define ASH_WM_WORKSPACE_WORKSPACE_OBSERVER_H_ | 6 #define ASH_WM_WORKSPACE_WORKSPACE_OBSERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
10 | 10 |
11 namespace aura { | 11 namespace aura { |
12 class Window; | 12 class Window; |
13 } | 13 } |
14 | 14 |
15 namespace aura_shell { | 15 namespace ash { |
16 namespace internal { | 16 namespace internal { |
17 class Workspace; | 17 class Workspace; |
18 class WorkspaceManager; | 18 class WorkspaceManager; |
19 | 19 |
20 // A class to observe changes in workspace state. | 20 // A class to observe changes in workspace state. |
21 class ASH_EXPORT WorkspaceObserver { | 21 class ASH_EXPORT WorkspaceObserver { |
22 public: | 22 public: |
23 // Invoked when |start| window is moved and inserted | 23 // Invoked when |start| window is moved and inserted |
24 // at the |target| window's position by |WorkspaceManager::RotateWindow|. | 24 // at the |target| window's position by |WorkspaceManager::RotateWindow|. |
25 virtual void WindowMoved(WorkspaceManager* manager, | 25 virtual void WindowMoved(WorkspaceManager* manager, |
26 aura::Window* source, | 26 aura::Window* source, |
27 aura::Window* target) = 0; | 27 aura::Window* target) = 0; |
28 | 28 |
29 // Invoked when the active workspace changes. |old| is | 29 // Invoked when the active workspace changes. |old| is |
30 // the old active workspace and can be NULL. | 30 // the old active workspace and can be NULL. |
31 virtual void ActiveWorkspaceChanged(WorkspaceManager* manager, | 31 virtual void ActiveWorkspaceChanged(WorkspaceManager* manager, |
32 Workspace* old) = 0; | 32 Workspace* old) = 0; |
33 protected: | 33 protected: |
34 virtual ~WorkspaceObserver() {} | 34 virtual ~WorkspaceObserver() {} |
35 }; | 35 }; |
36 | 36 |
37 } // namespace internal | 37 } // namespace internal |
38 } // namespace aura_shell | 38 } // namespace ash |
39 | 39 |
40 #endif // ASH_WM_WORKSPACE_WORKSPACE_OBSERVER_H_ | 40 #endif // ASH_WM_WORKSPACE_WORKSPACE_OBSERVER_H_ |
OLD | NEW |