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

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

Issue 11642014: Re-introduce the partial magnifier (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the build failure on win_aura Created 7 years, 11 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 | « ash/shell/shell_delegate_impl.h ('k') | ash/shell_delegate.h » ('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) 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_type_(MAGNIFIER_OFF) { 28 screen_magnifier_enabled_(false),
29 screen_magnifier_type_(kDefaultMagnifierType) {
29 } 30 }
30 31
31 ShellDelegateImpl::~ShellDelegateImpl() { 32 ShellDelegateImpl::~ShellDelegateImpl() {
32 } 33 }
33 34
34 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) { 35 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) {
35 watcher_ = watcher; 36 watcher_ = watcher;
36 if (launcher_delegate_) 37 if (launcher_delegate_)
37 launcher_delegate_->set_watcher(watcher); 38 launcher_delegate_->set_watcher(watcher);
38 } 39 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 128 }
128 129
129 void ShellDelegateImpl::ToggleHighContrast() { 130 void ShellDelegateImpl::ToggleHighContrast() {
130 high_contrast_enabled_ = !high_contrast_enabled_; 131 high_contrast_enabled_ = !high_contrast_enabled_;
131 } 132 }
132 133
133 bool ShellDelegateImpl::IsHighContrastEnabled() const { 134 bool ShellDelegateImpl::IsHighContrastEnabled() const {
134 return high_contrast_enabled_; 135 return high_contrast_enabled_;
135 } 136 }
136 137
137 void ShellDelegateImpl::SetMagnifier(MagnifierType type) { 138 void ShellDelegateImpl::SetMagnifierEnabled(bool enabled) {
139 screen_magnifier_enabled_ = enabled;
140 }
141
142 void ShellDelegateImpl::SetMagnifierType(MagnifierType type) {
138 screen_magnifier_type_ = type; 143 screen_magnifier_type_ = type;
139 } 144 }
140 145
146 bool ShellDelegateImpl::IsMagnifierEnabled() const {
147 return screen_magnifier_enabled_;
148 }
149
141 MagnifierType ShellDelegateImpl::GetMagnifierType() const { 150 MagnifierType ShellDelegateImpl::GetMagnifierType() const {
142 return screen_magnifier_type_; 151 return screen_magnifier_type_;
143 } 152 }
144 153
145 bool ShellDelegateImpl::ShouldAlwaysShowAccessibilityMenu() const { 154 bool ShellDelegateImpl::ShouldAlwaysShowAccessibilityMenu() const {
146 return false; 155 return false;
147 } 156 }
148 157
149 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() { 158 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() {
150 return ash::shell::CreateAppListViewDelegate(); 159 return ash::shell::CreateAppListViewDelegate();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 aura::client::StackingClient* ShellDelegateImpl::CreateStackingClient() { 218 aura::client::StackingClient* ShellDelegateImpl::CreateStackingClient() {
210 return new StackingController; 219 return new StackingController;
211 } 220 }
212 221
213 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { 222 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() {
214 return RootWindowHostFactory::Create(); 223 return RootWindowHostFactory::Create();
215 } 224 }
216 225
217 } // namespace shell 226 } // namespace shell
218 } // namespace ash 227 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/shell_delegate_impl.h ('k') | ash/shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698