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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc

Issue 155493002: Add key based scrolling on magnified screen for kiosk mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adressed comments, rebased Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | ui/aura/test/event_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
index 11c5ee9b7a83c7b4ac5aaeef7f5b78a3e6b0ca76..ab915283658153a6c9148f92d7f21f2695982456 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
@@ -5,12 +5,14 @@
#include "chrome/browser/ui/ash/chrome_shell_delegate.h"
#include "ash/accessibility_delegate.h"
+#include "ash/magnifier/magnifier_key_scroller.h"
#include "ash/media_delegate.h"
#include "ash/wm/mru_window_tracker.h"
#include "ash/wm/window_util.h"
#include "base/command_line.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/accessibility/accessibility_events.h"
+#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
@@ -41,15 +43,20 @@
namespace {
-// This function is used for restoring focus after the user session is started.
-// It's needed because some windows can be opened in background while login UI
-// is still active because we currently restore browser windows before login UI
-// is deleted.
-void RestoreFocus() {
+void InitAfterSessionStart() {
+ // Restor focus after the user session is started. It's needed
+ // because some windows can be opened in background while login UI
+ // is still active because we currently restore browser windows
+ // before login UI is deleted.
+ ash::Shell* shell = ash::Shell::GetInstance();
ash::MruWindowTracker::WindowList mru_list =
- ash::Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList();
+ shell->mru_window_tracker()->BuildMruWindowList();
if (!mru_list.empty())
mru_list.front()->Focus();
+
+ // Enable magnifier accelerators as there may be no mouse cursor in
+ // kiosk mode.
+ ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode());
}
class AccessibilityDelegateImpl : public ash::AccessibilityDelegate {
@@ -269,7 +276,7 @@ void ChromeShellDelegate::Observe(int type,
ash::Shell::GetInstance()->OnLoginUserProfilePrepared();
break;
case chrome::NOTIFICATION_SESSION_STARTED:
- RestoreFocus();
+ InitAfterSessionStart();
ash::Shell::GetInstance()->ShowShelf();
break;
case chrome::NOTIFICATION_APP_TERMINATING:
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | ui/aura/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698