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

Side by Side Diff: ui/aura_shell/shell.h

Issue 8602003: Revert 110637 - Add ShellAcceleratorController that manages global keyboard accelerators. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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/desktop_event_filter.cc ('k') | ui/aura_shell/shell.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_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 EventFilter;
21 class Window; 21 class Window;
22 } 22 }
23 namespace gfx { 23 namespace gfx {
24 class Rect; 24 class Rect;
25 } 25 }
26 26
27 namespace aura_shell { 27 namespace aura_shell {
28 28
29 class Launcher; 29 class Launcher;
30 class ShellAcceleratorController;
31 class ShellDelegate; 30 class ShellDelegate;
32 31
33 namespace internal { 32 namespace internal {
34 class DragDropController; 33 class DragDropController;
35 class ShelfLayoutController; 34 class ShelfLayoutController;
36 class WorkspaceController; 35 class WorkspaceController;
37 } 36 }
38 37
39 // Shell is a singleton object that presents the Shell API and implements the 38 // Shell is a singleton object that presents the Shell API and implements the
40 // Desktop's delegate interface. 39 // Desktop's delegate interface.
(...skipping 14 matching lines...) Expand all
55 aura::Window* GetContainer(int container_id); 54 aura::Window* GetContainer(int container_id);
56 const aura::Window* GetContainer(int container_id) const; 55 const aura::Window* GetContainer(int container_id) const;
57 56
58 // Adds or removes |filter| from the DesktopEventFilter. 57 // Adds or removes |filter| from the DesktopEventFilter.
59 void AddDesktopEventFilter(aura::EventFilter* filter); 58 void AddDesktopEventFilter(aura::EventFilter* filter);
60 void RemoveDesktopEventFilter(aura::EventFilter* filter); 59 void RemoveDesktopEventFilter(aura::EventFilter* filter);
61 60
62 // Toggles between overview mode and normal mode. 61 // Toggles between overview mode and normal mode.
63 void ToggleOverview(); 62 void ToggleOverview();
64 63
65 ShellAcceleratorController* accelerator_controller() {
66 return accelerator_controller_.get();
67 }
68 ShellDelegate* delegate() { return delegate_.get(); } 64 ShellDelegate* delegate() { return delegate_.get(); }
69 Launcher* launcher() { return launcher_.get(); } 65 Launcher* launcher() { return launcher_.get(); }
70 66
71 private: 67 private:
72 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; 68 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
73 69
74 explicit Shell(ShellDelegate* delegate); 70 explicit Shell(ShellDelegate* delegate);
75 virtual ~Shell(); 71 virtual ~Shell();
76 72
77 void Init(); 73 void Init();
78 74
79 // Enables WorkspaceManager. 75 // Enables WorkspaceManager.
80 void EnableWorkspaceManager(); 76 void EnableWorkspaceManager();
81 77
82 static Shell* instance_; 78 static Shell* instance_;
83 79
84 std::vector<WindowAndBoundsPair> to_restore_; 80 std::vector<WindowAndBoundsPair> to_restore_;
85 81
86 base::WeakPtrFactory<Shell> method_factory_; 82 base::WeakPtrFactory<Shell> method_factory_;
87 83
88 scoped_ptr<ShellAcceleratorController> accelerator_controller_;
89
90 scoped_ptr<ShellDelegate> delegate_; 84 scoped_ptr<ShellDelegate> delegate_;
91 85
92 scoped_ptr<Launcher> launcher_; 86 scoped_ptr<Launcher> launcher_;
93 87
94 scoped_ptr<internal::DragDropController> drag_drop_controller_; 88 scoped_ptr<internal::DragDropController> drag_drop_controller_;
95 scoped_ptr<internal::WorkspaceController> workspace_controller_; 89 scoped_ptr<internal::WorkspaceController> workspace_controller_;
96 scoped_ptr<internal::ShelfLayoutController> shelf_layout_controller_; 90 scoped_ptr<internal::ShelfLayoutController> shelf_layout_controller_;
97 91
98 DISALLOW_COPY_AND_ASSIGN(Shell); 92 DISALLOW_COPY_AND_ASSIGN(Shell);
99 }; 93 };
100 94
101 } // namespace aura_shell 95 } // namespace aura_shell
102 96
103 #endif // UI_AURA_SHELL_SHELL_H_ 97 #endif // UI_AURA_SHELL_SHELL_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/desktop_event_filter.cc ('k') | ui/aura_shell/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698