OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
6 | 6 |
7 #include "ash/accelerators/spoken_feedback_toggler.h" | |
7 #include "ash/accessibility_delegate.h" | 8 #include "ash/accessibility_delegate.h" |
8 #include "ash/magnifier/magnifier_key_scroller.h" | 9 #include "ash/magnifier/magnifier_key_scroller.h" |
9 #include "ash/media_delegate.h" | 10 #include "ash/media_delegate.h" |
10 #include "ash/wm/mru_window_tracker.h" | 11 #include "ash/wm/mru_window_tracker.h" |
11 #include "ash/wm/window_util.h" | 12 #include "ash/wm/window_util.h" |
12 #include "base/command_line.h" | 13 #include "base/command_line.h" |
13 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
14 #include "chrome/browser/accessibility/accessibility_events.h" | 15 #include "chrome/browser/accessibility/accessibility_events.h" |
15 #include "chrome/browser/app_mode/app_mode_utils.h" | 16 #include "chrome/browser/app_mode/app_mode_utils.h" |
16 #include "chrome/browser/chrome_notification_types.h" | 17 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 // because some windows can be opened in background while login UI | 49 // because some windows can be opened in background while login UI |
49 // is still active because we currently restore browser windows | 50 // is still active because we currently restore browser windows |
50 // before login UI is deleted. | 51 // before login UI is deleted. |
51 ash::Shell* shell = ash::Shell::GetInstance(); | 52 ash::Shell* shell = ash::Shell::GetInstance(); |
52 ash::MruWindowTracker::WindowList mru_list = | 53 ash::MruWindowTracker::WindowList mru_list = |
53 shell->mru_window_tracker()->BuildMruWindowList(); | 54 shell->mru_window_tracker()->BuildMruWindowList(); |
54 if (!mru_list.empty()) | 55 if (!mru_list.empty()) |
55 mru_list.front()->Focus(); | 56 mru_list.front()->Focus(); |
56 | 57 |
57 // Enable magnifier accelerators as there may be no mouse cursor in | 58 // Enable magnifier accelerators as there may be no mouse cursor in |
58 // kiosk mode. | 59 // kiosk mode. |
xiyuan
2014/02/14 01:50:21
Update the comment?
oshima
2014/02/14 18:03:25
Done.
| |
59 ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode()); | 60 ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode()); |
61 ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode()); | |
60 } | 62 } |
61 | 63 |
62 class AccessibilityDelegateImpl : public ash::AccessibilityDelegate { | 64 class AccessibilityDelegateImpl : public ash::AccessibilityDelegate { |
63 public: | 65 public: |
64 AccessibilityDelegateImpl() {} | 66 AccessibilityDelegateImpl() {} |
65 virtual ~AccessibilityDelegateImpl() {} | 67 virtual ~AccessibilityDelegateImpl() {} |
66 | 68 |
67 virtual void ToggleHighContrast() OVERRIDE { | 69 virtual void ToggleHighContrast() OVERRIDE { |
68 DCHECK(chromeos::AccessibilityManager::Get()); | 70 DCHECK(chromeos::AccessibilityManager::Get()); |
69 chromeos::AccessibilityManager::Get()->EnableHighContrast( | 71 chromeos::AccessibilityManager::Get()->EnableHighContrast( |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
293 registrar_.Add(this, | 295 registrar_.Add(this, |
294 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 296 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
295 content::NotificationService::AllSources()); | 297 content::NotificationService::AllSources()); |
296 registrar_.Add(this, | 298 registrar_.Add(this, |
297 chrome::NOTIFICATION_SESSION_STARTED, | 299 chrome::NOTIFICATION_SESSION_STARTED, |
298 content::NotificationService::AllSources()); | 300 content::NotificationService::AllSources()); |
299 registrar_.Add(this, | 301 registrar_.Add(this, |
300 chrome::NOTIFICATION_APP_TERMINATING, | 302 chrome::NOTIFICATION_APP_TERMINATING, |
301 content::NotificationService::AllSources()); | 303 content::NotificationService::AllSources()); |
302 } | 304 } |
OLD | NEW |