| 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 "chrome/browser/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 namespace { | 81 namespace { |
| 82 | 82 |
| 83 const char kKeyboardShortcutHelpPageUrl[] = | 83 const char kKeyboardShortcutHelpPageUrl[] = |
| 84 "https://support.google.com/chromebook/answer/183101"; | 84 "https://support.google.com/chromebook/answer/183101"; |
| 85 | 85 |
| 86 void InitAfterFirstSessionStart() { | 86 void InitAfterFirstSessionStart() { |
| 87 // Restore focus after the user session is started. It's needed because some | 87 // Restore focus after the user session is started. It's needed because some |
| 88 // windows can be opened in background while login UI is still active because | 88 // windows can be opened in background while login UI is still active because |
| 89 // we currently restore browser windows before login UI is deleted. | 89 // we currently restore browser windows before login UI is deleted. |
| 90 aura::Window::Windows mru_list = ash::WmWindow::ToAuraWindows( | 90 aura::Window::Windows mru_list = ash::WmWindow::ToAuraWindows( |
| 91 ash::WmShell::Get()->mru_window_tracker()->BuildMruWindowList()); | 91 ash::Shell::Get()->mru_window_tracker()->BuildMruWindowList()); |
| 92 if (!mru_list.empty()) | 92 if (!mru_list.empty()) |
| 93 mru_list.front()->Focus(); | 93 mru_list.front()->Focus(); |
| 94 | 94 |
| 95 // Enable magnifier scroll keys as there may be no mouse cursor in kiosk mode. | 95 // Enable magnifier scroll keys as there may be no mouse cursor in kiosk mode. |
| 96 ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode()); | 96 ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode()); |
| 97 | 97 |
| 98 // Enable long press action to toggle spoken feedback with hotrod | 98 // Enable long press action to toggle spoken feedback with hotrod |
| 99 // remote which can't handle shortcut. | 99 // remote which can't handle shortcut. |
| 100 ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode()); | 100 ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode()); |
| 101 } | 101 } |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 NOTREACHED() << "Unexpected notification " << type; | 599 NOTREACHED() << "Unexpected notification " << type; |
| 600 } | 600 } |
| 601 } | 601 } |
| 602 | 602 |
| 603 void ChromeShellDelegate::PlatformInit() { | 603 void ChromeShellDelegate::PlatformInit() { |
| 604 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 604 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 605 content::NotificationService::AllSources()); | 605 content::NotificationService::AllSources()); |
| 606 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 606 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
| 607 content::NotificationService::AllSources()); | 607 content::NotificationService::AllSources()); |
| 608 } | 608 } |
| OLD | NEW |