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

Side by Side Diff: chrome/browser/chromeos/events/keyboard_driven_event_rewriter.cc

Issue 2438063002: user_manager: Remove deps on session_manager (Closed)
Patch Set: fix nits in PS1 Created 4 years, 2 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
OLDNEW
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/chromeos/events/keyboard_driven_event_rewriter.h" 5 #include "chrome/browser/chromeos/events/keyboard_driven_event_rewriter.h"
6 6
7 #include "chrome/browser/chromeos/events/event_rewriter.h" 7 #include "chrome/browser/chromeos/events/event_rewriter.h"
8 #include "chrome/browser/chromeos/system/input_device_settings.h" 8 #include "chrome/browser/chromeos/system/input_device_settings.h"
9 #include "components/user_manager/user_manager.h" 9 #include "components/session_manager/core/session_manager.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
11 #include "ui/events/event_utils.h" 11 #include "ui/events/event_utils.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 namespace { 15 namespace {
16 16
17 const int kModifierMask = ui::EF_SHIFT_DOWN; 17 const int kModifierMask = ui::EF_SHIFT_DOWN;
18 18
19 KeyboardDrivenEventRewriter* instance = nullptr; 19 KeyboardDrivenEventRewriter* instance = nullptr;
20 20
21 // Returns true if and only if it is on login screen (i.e. user is not logged 21 // Returns true if and only if it is on login screen (i.e. user is not logged
22 // in) and the keyboard driven flag in the OEM manifest is on. 22 // in) and the keyboard driven flag in the OEM manifest is on.
23 bool ShouldStripModifiersForArrowKeysAndEnter() { 23 bool ShouldStripModifiersForArrowKeysAndEnter() {
24 if (user_manager::UserManager::IsInitialized() && 24 if (session_manager::SessionManager::Get() &&
25 !user_manager::UserManager::Get()->IsSessionStarted()) { 25 !session_manager::SessionManager::Get()->IsSessionStarted()) {
26 return system::InputDeviceSettings::Get() 26 return system::InputDeviceSettings::Get()
27 ->ForceKeyboardDrivenUINavigation(); 27 ->ForceKeyboardDrivenUINavigation();
28 } 28 }
29 29
30 return false; 30 return false;
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 // static 35 // static
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 state.flags |= ui::EF_SHIFT_DOWN; 107 state.flags |= ui::EF_SHIFT_DOWN;
108 } 108 }
109 } 109 }
110 110
111 chromeos::EventRewriter::BuildRewrittenKeyEvent(key_event, state, 111 chromeos::EventRewriter::BuildRewrittenKeyEvent(key_event, state,
112 rewritten_event); 112 rewritten_event);
113 return ui::EVENT_REWRITE_REWRITTEN; 113 return ui::EVENT_REWRITE_REWRITTEN;
114 } 114 }
115 115
116 } // namespace chromeos 116 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/app_mode/startup_app_launcher.cc ('k') | chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698