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

Side by Side Diff: wm/shell/shell_delegate_impl.cc

Issue 11485006: Add window manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Push gfx::AcceleratedWidget usage into platform specific code. Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « wm/shell/shell_delegate_impl.h ('k') | wm/shell/shell_main.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) 2013 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 #include "ash/shell/shell_delegate_impl.h" 5 #include "wm/shell/shell_delegate_impl.h"
6 6
7 #include "ash/caps_lock_delegate_stub.h" 7 #include "ash/caps_lock_delegate_stub.h"
8 #include "ash/host/root_window_host_factory.h" 8 #include "ash/shell/context_menu.h"
9 #include "ash/shell/example_factory.h" 9 #include "ash/shell/example_factory.h"
10 #include "ash/shell/launcher_delegate_impl.h" 10 #include "ash/shell/launcher_delegate_impl.h"
11 #include "ash/shell/context_menu.h"
12 #include "ash/shell/toplevel_window.h" 11 #include "ash/shell/toplevel_window.h"
13 #include "ash/shell_window_ids.h" 12 #include "ash/shell_window_ids.h"
14 #include "ash/wm/window_util.h" 13 #include "ash/wm/window_util.h"
15 #include "base/message_loop.h" 14 #include "base/message_loop.h"
16 #include "ui/aura/window.h" 15 #include "ui/aura/window.h"
16 #include "wm/host/root_window_host_factory.h"
17 17
18 namespace ash { 18 namespace wm {
19 namespace shell { 19 namespace shell {
20 20
21 ShellDelegateImpl::ShellDelegateImpl() 21 ShellDelegateImpl::ShellDelegateImpl()
22 : watcher_(NULL), 22 : watcher_(NULL),
23 launcher_delegate_(NULL), 23 launcher_delegate_(NULL),
24 locked_(false), 24 locked_(false),
25 spoken_feedback_enabled_(false), 25 spoken_feedback_enabled_(false),
26 high_contrast_enabled_(false), 26 high_contrast_enabled_(false),
27 screen_magnifier_enabled_(false), 27 screen_magnifier_enabled_(false),
28 screen_magnifier_type_(kDefaultMagnifierType) { 28 screen_magnifier_type_(ash::kDefaultMagnifierType) {
29 } 29 }
30 30
31 ShellDelegateImpl::~ShellDelegateImpl() { 31 ShellDelegateImpl::~ShellDelegateImpl() {
32 } 32 }
33 33
34 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) { 34 void ShellDelegateImpl::SetWatcher(ash::shell::WindowWatcher* watcher) {
35 watcher_ = watcher; 35 watcher_ = watcher;
36 if (launcher_delegate_) 36 if (launcher_delegate_)
37 launcher_delegate_->set_watcher(watcher); 37 launcher_delegate_->set_watcher(watcher);
38 } 38 }
39 39
40 bool ShellDelegateImpl::IsUserLoggedIn() const { 40 bool ShellDelegateImpl::IsUserLoggedIn() const {
41 return true; 41 return true;
42 } 42 }
43 43
44 bool ShellDelegateImpl::IsSessionStarted() const { 44 bool ShellDelegateImpl::IsSessionStarted() const {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 void ShellDelegateImpl::OpenCrosh() { 97 void ShellDelegateImpl::OpenCrosh() {
98 } 98 }
99 99
100 void ShellDelegateImpl::OpenMobileSetup(const std::string& service_path) { 100 void ShellDelegateImpl::OpenMobileSetup(const std::string& service_path) {
101 } 101 }
102 102
103 void ShellDelegateImpl::RestoreTab() { 103 void ShellDelegateImpl::RestoreTab() {
104 } 104 }
105 105
106 bool ShellDelegateImpl::RotatePaneFocus(Shell::Direction direction) { 106 bool ShellDelegateImpl::RotatePaneFocus(ash::Shell::Direction direction) {
107 return true; 107 return true;
108 } 108 }
109 109
110 void ShellDelegateImpl::ShowKeyboardOverlay() { 110 void ShellDelegateImpl::ShowKeyboardOverlay() {
111 } 111 }
112 112
113 void ShellDelegateImpl::ShowTaskManager() { 113 void ShellDelegateImpl::ShowTaskManager() {
114 } 114 }
115 115
116 content::BrowserContext* ShellDelegateImpl::GetCurrentBrowserContext() { 116 content::BrowserContext* ShellDelegateImpl::GetCurrentBrowserContext() {
117 return Shell::GetInstance()->browser_context(); 117 return ash::Shell::GetInstance()->browser_context();
118 } 118 }
119 119
120 void ShellDelegateImpl::ToggleSpokenFeedback( 120 void ShellDelegateImpl::ToggleSpokenFeedback(
121 AccessibilityNotificationVisibility notify) { 121 ash::AccessibilityNotificationVisibility notify) {
122 spoken_feedback_enabled_ = !spoken_feedback_enabled_; 122 spoken_feedback_enabled_ = !spoken_feedback_enabled_;
123 } 123 }
124 124
125 bool ShellDelegateImpl::IsSpokenFeedbackEnabled() const { 125 bool ShellDelegateImpl::IsSpokenFeedbackEnabled() const {
126 return spoken_feedback_enabled_; 126 return spoken_feedback_enabled_;
127 } 127 }
128 128
129 void ShellDelegateImpl::ToggleHighContrast() { 129 void ShellDelegateImpl::ToggleHighContrast() {
130 high_contrast_enabled_ = !high_contrast_enabled_; 130 high_contrast_enabled_ = !high_contrast_enabled_;
131 } 131 }
132 132
133 bool ShellDelegateImpl::IsHighContrastEnabled() const { 133 bool ShellDelegateImpl::IsHighContrastEnabled() const {
134 return high_contrast_enabled_; 134 return high_contrast_enabled_;
135 } 135 }
136 136
137 void ShellDelegateImpl::SetMagnifierEnabled(bool enabled) { 137 void ShellDelegateImpl::SetMagnifierEnabled(bool enabled) {
138 screen_magnifier_enabled_ = enabled; 138 screen_magnifier_enabled_ = enabled;
139 } 139 }
140 140
141 void ShellDelegateImpl::SetMagnifierType(MagnifierType type) { 141 void ShellDelegateImpl::SetMagnifierType(ash::MagnifierType type) {
142 screen_magnifier_type_ = type; 142 screen_magnifier_type_ = type;
143 } 143 }
144 144
145 bool ShellDelegateImpl::IsMagnifierEnabled() const { 145 bool ShellDelegateImpl::IsMagnifierEnabled() const {
146 return screen_magnifier_enabled_; 146 return screen_magnifier_enabled_;
147 } 147 }
148 148
149 MagnifierType ShellDelegateImpl::GetMagnifierType() const { 149 ash::MagnifierType ShellDelegateImpl::GetMagnifierType() const {
150 return screen_magnifier_type_; 150 return screen_magnifier_type_;
151 } 151 }
152 152
153 bool ShellDelegateImpl::ShouldAlwaysShowAccessibilityMenu() const { 153 bool ShellDelegateImpl::ShouldAlwaysShowAccessibilityMenu() const {
154 return false; 154 return false;
155 } 155 }
156 156
157 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() { 157 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() {
158 return ash::shell::CreateAppListViewDelegate(); 158 return ash::shell::CreateAppListViewDelegate();
159 } 159 }
160 160
161 ash::LauncherDelegate* ShellDelegateImpl::CreateLauncherDelegate( 161 ash::LauncherDelegate* ShellDelegateImpl::CreateLauncherDelegate(
162 ash::LauncherModel* model) { 162 ash::LauncherModel* model) {
163 launcher_delegate_ = new LauncherDelegateImpl(watcher_); 163 launcher_delegate_ = new ash::shell::LauncherDelegateImpl(watcher_);
164 return launcher_delegate_; 164 return launcher_delegate_;
165 } 165 }
166 166
167 ash::SystemTrayDelegate* ShellDelegateImpl::CreateSystemTrayDelegate() { 167 ash::SystemTrayDelegate* ShellDelegateImpl::CreateSystemTrayDelegate() {
168 return NULL; 168 return NULL;
169 } 169 }
170 170
171 ash::UserWallpaperDelegate* ShellDelegateImpl::CreateUserWallpaperDelegate() { 171 ash::UserWallpaperDelegate* ShellDelegateImpl::CreateUserWallpaperDelegate() {
172 return NULL; 172 return NULL;
173 } 173 }
174 174
175 ash::CapsLockDelegate* ShellDelegateImpl::CreateCapsLockDelegate() { 175 ash::CapsLockDelegate* ShellDelegateImpl::CreateCapsLockDelegate() {
176 return new CapsLockDelegateStub; 176 return new ash::CapsLockDelegateStub;
177 } 177 }
178 178
179 aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() { 179 aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() {
180 return NULL; 180 return NULL;
181 } 181 }
182 182
183 void ShellDelegateImpl::OpenFeedbackPage() { 183 void ShellDelegateImpl::OpenFeedbackPage() {
184 } 184 }
185 185
186 void ShellDelegateImpl::RecordUserMetricsAction(UserMetricsAction action) { 186 void ShellDelegateImpl::RecordUserMetricsAction(
187 ash::UserMetricsAction action) {
187 } 188 }
188 189
189 void ShellDelegateImpl::HandleMediaNextTrack() { 190 void ShellDelegateImpl::HandleMediaNextTrack() {
190 } 191 }
191 192
192 void ShellDelegateImpl::HandleMediaPlayPause() { 193 void ShellDelegateImpl::HandleMediaPlayPause() {
193 } 194 }
194 195
195 void ShellDelegateImpl::HandleMediaPrevTrack() { 196 void ShellDelegateImpl::HandleMediaPrevTrack() {
196 } 197 }
197 198
198 string16 ShellDelegateImpl::GetTimeRemainingString(base::TimeDelta delta) { 199 string16 ShellDelegateImpl::GetTimeRemainingString(base::TimeDelta delta) {
199 return string16(); 200 return string16();
200 } 201 }
201 202
202 string16 ShellDelegateImpl::GetTimeDurationLongString(base::TimeDelta delta) { 203 string16 ShellDelegateImpl::GetTimeDurationLongString(base::TimeDelta delta) {
203 return string16(); 204 return string16();
204 } 205 }
205 206
206 void ShellDelegateImpl::SaveScreenMagnifierScale(double scale) { 207 void ShellDelegateImpl::SaveScreenMagnifierScale(double scale) {
207 } 208 }
208 209
209 double ShellDelegateImpl::GetSavedScreenMagnifierScale() { 210 double ShellDelegateImpl::GetSavedScreenMagnifierScale() {
210 return std::numeric_limits<double>::min(); 211 return std::numeric_limits<double>::min();
211 } 212 }
212 213
213 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::RootWindow* root) { 214 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::RootWindow* root) {
214 return new ContextMenu(root); 215 return new ash::shell::ContextMenu(root);
215 } 216 }
216 217
217 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { 218 ash::RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() {
218 return RootWindowHostFactory::Create(); 219 return RootWindowHostFactory::Create();
219 } 220 }
220 221
221 string16 ShellDelegateImpl::GetProductName() const { 222 string16 ShellDelegateImpl::GetProductName() const {
222 return string16(); 223 return string16();
223 } 224 }
224 225
225 } // namespace shell 226 } // namespace shell
226 } // namespace ash 227 } // namespace wm
OLDNEW
« no previous file with comments | « wm/shell/shell_delegate_impl.h ('k') | wm/shell/shell_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698