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/chromeos/extensions/input_method_api.h" | 5 #include "chrome/browser/chromeos/extensions/input_method_api.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | |
9 #include <set> | 8 #include <set> |
10 #include <string> | 9 #include <string> |
| 10 #include <utility> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "chrome/browser/chromeos/extensions/dictionary_event_router.h" | 16 #include "chrome/browser/chromeos/extensions/dictionary_event_router.h" |
17 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" | 17 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" |
18 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 18 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
19 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" | 19 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" |
20 #include "chrome/browser/spellchecker/spellcheck_factory.h" | 20 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 #if !defined(OS_CHROMEOS) | 163 #if !defined(OS_CHROMEOS) |
164 EXTENSION_FUNCTION_VALIDATE(false); | 164 EXTENSION_FUNCTION_VALIDATE(false); |
165 #else | 165 #else |
166 ProfileSyncService* profile_sync_service = | 166 ProfileSyncService* profile_sync_service = |
167 ProfileSyncServiceFactory::GetForProfile( | 167 ProfileSyncServiceFactory::GetForProfile( |
168 Profile::FromBrowserContext(browser_context())); | 168 Profile::FromBrowserContext(browser_context())); |
169 if (!profile_sync_service) | 169 if (!profile_sync_service) |
170 return RespondNow(Error("Sync service is not ready for current profile.")); | 170 return RespondNow(Error("Sync service is not ready for current profile.")); |
171 scoped_ptr<base::Value> ret(new base::FundamentalValue( | 171 scoped_ptr<base::Value> ret(new base::FundamentalValue( |
172 profile_sync_service->IsEncryptEverythingEnabled())); | 172 profile_sync_service->IsEncryptEverythingEnabled())); |
173 return RespondNow(OneArgument(ret.Pass())); | 173 return RespondNow(OneArgument(std::move(ret))); |
174 #endif | 174 #endif |
175 } | 175 } |
176 | 176 |
177 // static | 177 // static |
178 const char InputMethodAPI::kOnDictionaryChanged[] = | 178 const char InputMethodAPI::kOnDictionaryChanged[] = |
179 "inputMethodPrivate.onDictionaryChanged"; | 179 "inputMethodPrivate.onDictionaryChanged"; |
180 | 180 |
181 // static | 181 // static |
182 const char InputMethodAPI::kOnDictionaryLoaded[] = | 182 const char InputMethodAPI::kOnDictionaryLoaded[] = |
183 "inputMethodPrivate.onDictionaryLoaded"; | 183 "inputMethodPrivate.onDictionaryLoaded"; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> > | 240 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> > |
241 g_factory = LAZY_INSTANCE_INITIALIZER; | 241 g_factory = LAZY_INSTANCE_INITIALIZER; |
242 | 242 |
243 // static | 243 // static |
244 BrowserContextKeyedAPIFactory<InputMethodAPI>* | 244 BrowserContextKeyedAPIFactory<InputMethodAPI>* |
245 InputMethodAPI::GetFactoryInstance() { | 245 InputMethodAPI::GetFactoryInstance() { |
246 return g_factory.Pointer(); | 246 return g_factory.Pointer(); |
247 } | 247 } |
248 | 248 |
249 } // namespace extensions | 249 } // namespace extensions |
OLD | NEW |