| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/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/host/root_window_host_factory.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" | 11 #include "ash/shell/context_menu.h" |
| 12 #include "ash/shell/toplevel_window.h" | 12 #include "ash/shell/toplevel_window.h" |
| 13 #include "ash/shell_window_ids.h" | 13 #include "ash/shell_window_ids.h" |
| 14 #include "ash/wm/stacking_controller.h" | 14 #include "ash/wm/stacking_controller.h" |
| 15 #include "ash/wm/window_util.h" | 15 #include "ash/wm/window_util.h" |
| 16 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
| 17 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
| 18 | 18 |
| 19 namespace ash { | 19 namespace ash { |
| 20 namespace shell { | 20 namespace shell { |
| 21 | 21 |
| 22 ShellDelegateImpl::ShellDelegateImpl() | 22 ShellDelegateImpl::ShellDelegateImpl() |
| 23 : watcher_(NULL), | 23 : watcher_(NULL), |
| 24 launcher_delegate_(NULL), | 24 launcher_delegate_(NULL), |
| 25 locked_(false), | 25 locked_(false), |
| 26 spoken_feedback_enabled_(false), | 26 spoken_feedback_enabled_(false), |
| 27 high_contrast_enabled_(false), | 27 high_contrast_enabled_(false), |
| 28 screen_magnifier_enabled_(false), | 28 screen_magnifier_type_(MAGNIFIER_OFF) { |
| 29 screen_magnifier_type_(kDefaultMagnifierType) { | |
| 30 } | 29 } |
| 31 | 30 |
| 32 ShellDelegateImpl::~ShellDelegateImpl() { | 31 ShellDelegateImpl::~ShellDelegateImpl() { |
| 33 } | 32 } |
| 34 | 33 |
| 35 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) { | 34 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) { |
| 36 watcher_ = watcher; | 35 watcher_ = watcher; |
| 37 if (launcher_delegate_) | 36 if (launcher_delegate_) |
| 38 launcher_delegate_->set_watcher(watcher); | 37 launcher_delegate_->set_watcher(watcher); |
| 39 } | 38 } |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 127 } |
| 129 | 128 |
| 130 void ShellDelegateImpl::ToggleHighContrast() { | 129 void ShellDelegateImpl::ToggleHighContrast() { |
| 131 high_contrast_enabled_ = !high_contrast_enabled_; | 130 high_contrast_enabled_ = !high_contrast_enabled_; |
| 132 } | 131 } |
| 133 | 132 |
| 134 bool ShellDelegateImpl::IsHighContrastEnabled() const { | 133 bool ShellDelegateImpl::IsHighContrastEnabled() const { |
| 135 return high_contrast_enabled_; | 134 return high_contrast_enabled_; |
| 136 } | 135 } |
| 137 | 136 |
| 138 void ShellDelegateImpl::SetMagnifierEnabled(bool enabled) { | 137 void ShellDelegateImpl::SetMagnifier(MagnifierType type) { |
| 139 screen_magnifier_enabled_ = enabled; | |
| 140 } | |
| 141 | |
| 142 void ShellDelegateImpl::SetMagnifierType(MagnifierType type) { | |
| 143 screen_magnifier_type_ = type; | 138 screen_magnifier_type_ = type; |
| 144 } | 139 } |
| 145 | 140 |
| 146 bool ShellDelegateImpl::IsMagnifierEnabled() const { | |
| 147 return screen_magnifier_enabled_; | |
| 148 } | |
| 149 | |
| 150 MagnifierType ShellDelegateImpl::GetMagnifierType() const { | 141 MagnifierType ShellDelegateImpl::GetMagnifierType() const { |
| 151 return screen_magnifier_type_; | 142 return screen_magnifier_type_; |
| 152 } | 143 } |
| 153 | 144 |
| 154 bool ShellDelegateImpl::ShouldAlwaysShowAccessibilityMenu() const { | 145 bool ShellDelegateImpl::ShouldAlwaysShowAccessibilityMenu() const { |
| 155 return false; | 146 return false; |
| 156 } | 147 } |
| 157 | 148 |
| 158 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() { | 149 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() { |
| 159 return ash::shell::CreateAppListViewDelegate(); | 150 return ash::shell::CreateAppListViewDelegate(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 aura::client::StackingClient* ShellDelegateImpl::CreateStackingClient() { | 209 aura::client::StackingClient* ShellDelegateImpl::CreateStackingClient() { |
| 219 return new StackingController; | 210 return new StackingController; |
| 220 } | 211 } |
| 221 | 212 |
| 222 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { | 213 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { |
| 223 return RootWindowHostFactory::Create(); | 214 return RootWindowHostFactory::Create(); |
| 224 } | 215 } |
| 225 | 216 |
| 226 } // namespace shell | 217 } // namespace shell |
| 227 } // namespace ash | 218 } // namespace ash |
| OLD | NEW |