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 UI_AURA_SHELL_SHELL_H_ | 5 #ifndef UI_AURA_SHELL_SHELL_H_ |
6 #define UI_AURA_SHELL_SHELL_H_ | 6 #define UI_AURA_SHELL_SHELL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/task.h" | 14 #include "base/task.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "ui/aura_shell/aura_shell_export.h" | 17 #include "ui/aura_shell/aura_shell_export.h" |
18 | 18 |
19 namespace aura { | 19 namespace aura { |
| 20 class EventFilter; |
20 class Window; | 21 class Window; |
21 } | 22 } |
22 namespace gfx { | 23 namespace gfx { |
23 class Rect; | 24 class Rect; |
24 } | 25 } |
25 | 26 |
26 namespace aura_shell { | 27 namespace aura_shell { |
27 | 28 |
28 class Launcher; | 29 class Launcher; |
29 class ShellDelegate; | 30 class ShellDelegate; |
(...skipping 15 matching lines...) Expand all Loading... |
45 static Shell* CreateInstance(ShellDelegate* delegate); | 46 static Shell* CreateInstance(ShellDelegate* delegate); |
46 | 47 |
47 // Should never be called before |CreateInstance()|. | 48 // Should never be called before |CreateInstance()|. |
48 static Shell* GetInstance(); | 49 static Shell* GetInstance(); |
49 | 50 |
50 static void DeleteInstanceForTesting(); | 51 static void DeleteInstanceForTesting(); |
51 | 52 |
52 aura::Window* GetContainer(int container_id); | 53 aura::Window* GetContainer(int container_id); |
53 const aura::Window* GetContainer(int container_id) const; | 54 const aura::Window* GetContainer(int container_id) const; |
54 | 55 |
| 56 // Adds or removes |filter| from the DesktopEventFilter. |
| 57 void AddDesktopEventFilter(aura::EventFilter* filter); |
| 58 void RemoveDesktopEventFilter(aura::EventFilter* filter); |
| 59 |
55 // Toggles between overview mode and normal mode. | 60 // Toggles between overview mode and normal mode. |
56 void ToggleOverview(); | 61 void ToggleOverview(); |
57 | 62 |
58 ShellDelegate* delegate() { return delegate_.get(); } | 63 ShellDelegate* delegate() { return delegate_.get(); } |
59 Launcher* launcher() { return launcher_.get(); } | 64 Launcher* launcher() { return launcher_.get(); } |
60 | 65 |
61 private: | 66 private: |
62 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; | 67 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; |
63 | 68 |
64 explicit Shell(ShellDelegate* delegate); | 69 explicit Shell(ShellDelegate* delegate); |
(...skipping 16 matching lines...) Expand all Loading... |
81 | 86 |
82 scoped_ptr<internal::WorkspaceController> workspace_controller_; | 87 scoped_ptr<internal::WorkspaceController> workspace_controller_; |
83 scoped_ptr<internal::ShelfLayoutController> shelf_layout_controller_; | 88 scoped_ptr<internal::ShelfLayoutController> shelf_layout_controller_; |
84 | 89 |
85 DISALLOW_COPY_AND_ASSIGN(Shell); | 90 DISALLOW_COPY_AND_ASSIGN(Shell); |
86 }; | 91 }; |
87 | 92 |
88 } // namespace aura_shell | 93 } // namespace aura_shell |
89 | 94 |
90 #endif // UI_AURA_SHELL_SHELL_H_ | 95 #endif // UI_AURA_SHELL_SHELL_H_ |
OLD | NEW |