OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/api/virtual_keyboard_private/chrome_virtual_
keyboard_delegate.h" | 5 #include "chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_
keyboard_delegate.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/metrics/user_metrics_action.h" | 11 #include "base/metrics/user_metrics_action.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 13 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
14 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" | 14 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
15 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
16 #include "chrome/browser/ui/chrome_pages.h" | 16 #include "chrome/browser/ui/chrome_pages.h" |
17 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
18 #include "components/user_manager/user_manager.h" | 18 #include "components/user_manager/user_manager.h" |
19 #include "content/public/browser/user_metrics.h" | 19 #include "content/public/browser/user_metrics.h" |
20 #include "extensions/common/api/virtual_keyboard_private.h" | 20 #include "extensions/common/api/virtual_keyboard_private.h" |
21 #include "ui/aura/window_tree_host.h" | 21 #include "ui/aura/window_tree_host.h" |
22 #include "ui/keyboard/keyboard_controller.h" | 22 #include "ui/keyboard/keyboard_controller.h" |
23 #include "ui/keyboard/keyboard_switches.h" | 23 #include "ui/keyboard/keyboard_switches.h" |
24 #include "ui/keyboard/keyboard_util.h" | 24 #include "ui/keyboard/keyboard_util.h" |
25 | 25 |
26 namespace keyboard_api = extensions::core_api::virtual_keyboard_private; | 26 namespace keyboard_api = extensions::api::virtual_keyboard_private; |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 aura::Window* GetKeyboardContainer() { | 30 aura::Window* GetKeyboardContainer() { |
31 keyboard::KeyboardController* controller = | 31 keyboard::KeyboardController* controller = |
32 keyboard::KeyboardController::GetInstance(); | 32 keyboard::KeyboardController::GetInstance(); |
33 return controller ? controller->GetContainerWindow() : nullptr; | 33 return controller ? controller->GetContainerWindow() : nullptr; |
34 } | 34 } |
35 | 35 |
36 std::string GenerateFeatureFlag(std::string feature, bool enabled) { | 36 std::string GenerateFeatureFlag(std::string feature, bool enabled) { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 } | 151 } |
152 | 152 |
153 bool ChromeVirtualKeyboardDelegate::IsLanguageSettingsEnabled() { | 153 bool ChromeVirtualKeyboardDelegate::IsLanguageSettingsEnabled() { |
154 return (user_manager::UserManager::Get()->IsUserLoggedIn() && | 154 return (user_manager::UserManager::Get()->IsUserLoggedIn() && |
155 !chromeos::UserAddingScreen::Get()->IsRunning() && | 155 !chromeos::UserAddingScreen::Get()->IsRunning() && |
156 !(chromeos::ScreenLocker::default_screen_locker() && | 156 !(chromeos::ScreenLocker::default_screen_locker() && |
157 chromeos::ScreenLocker::default_screen_locker()->locked())); | 157 chromeos::ScreenLocker::default_screen_locker()->locked())); |
158 } | 158 } |
159 | 159 |
160 } // namespace extensions | 160 } // namespace extensions |
OLD | NEW |