OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/extensions/api/input/input.h" | 5 #include "chrome/browser/extensions/api/input/input.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return false; | 145 return false; |
146 #endif | 146 #endif |
147 } | 147 } |
148 | 148 |
149 bool VirtualKeyboardPrivateGetKeyboardConfigFunction::RunSync() { | 149 bool VirtualKeyboardPrivateGetKeyboardConfigFunction::RunSync() { |
150 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 150 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
151 #if defined(USE_ASH) | 151 #if defined(USE_ASH) |
152 base::DictionaryValue* results = new base::DictionaryValue(); | 152 base::DictionaryValue* results = new base::DictionaryValue(); |
153 results->SetString("layout", keyboard::GetKeyboardLayout()); | 153 results->SetString("layout", keyboard::GetKeyboardLayout()); |
154 results->SetBoolean("a11ymode", keyboard::GetAccessibilityKeyboardEnabled()); | 154 results->SetBoolean("a11ymode", keyboard::GetAccessibilityKeyboardEnabled()); |
| 155 results->SetBoolean("experimental", |
| 156 keyboard::IsExperimentalInputViewEnabled()); |
155 SetResult(results); | 157 SetResult(results); |
156 return true; | 158 return true; |
157 #else | 159 #else |
158 error_ = kNotYetImplementedError; | 160 error_ = kNotYetImplementedError; |
159 return false; | 161 return false; |
160 #endif | 162 #endif |
161 } | 163 } |
162 | 164 |
163 InputAPI::InputAPI(content::BrowserContext* context) {} | 165 InputAPI::InputAPI(content::BrowserContext* context) {} |
164 | 166 |
165 InputAPI::~InputAPI() { | 167 InputAPI::~InputAPI() { |
166 } | 168 } |
167 | 169 |
168 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputAPI> > g_factory = | 170 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputAPI> > g_factory = |
169 LAZY_INSTANCE_INITIALIZER; | 171 LAZY_INSTANCE_INITIALIZER; |
170 | 172 |
171 // static | 173 // static |
172 BrowserContextKeyedAPIFactory<InputAPI>* InputAPI::GetFactoryInstance() { | 174 BrowserContextKeyedAPIFactory<InputAPI>* InputAPI::GetFactoryInstance() { |
173 return g_factory.Pointer(); | 175 return g_factory.Pointer(); |
174 } | 176 } |
175 | 177 |
176 } // namespace extensions | 178 } // namespace extensions |
OLD | NEW |