OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 #if defined(OS_CHROMEOS) | 87 #if defined(OS_CHROMEOS) |
88 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" | 88 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" |
89 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" | 89 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" |
90 #include "webkit/fileapi/file_system_context.h" | 90 #include "webkit/fileapi/file_system_context.h" |
91 #include "webkit/fileapi/file_system_mount_point_provider.h" | 91 #include "webkit/fileapi/file_system_mount_point_provider.h" |
92 #include "webkit/fileapi/file_system_path_manager.h" | 92 #include "webkit/fileapi/file_system_path_manager.h" |
93 #endif | 93 #endif |
94 | 94 |
95 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) | 95 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) |
| 96 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 97 #include "chrome/browser/chromeos/cros/input_method_library.h" |
96 #include "chrome/browser/extensions/extension_input_ui_api.h" | 98 #include "chrome/browser/extensions/extension_input_ui_api.h" |
97 #endif | 99 #endif |
98 | 100 |
99 using base::Time; | 101 using base::Time; |
100 | 102 |
101 namespace errors = extension_manifest_errors; | 103 namespace errors = extension_manifest_errors; |
102 | 104 |
103 namespace { | 105 namespace { |
104 | 106 |
105 #if defined(OS_LINUX) | 107 #if defined(OS_LINUX) |
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 const Extension::NaClModuleInfo& module = extension->nacl_modules()[i]; | 1260 const Extension::NaClModuleInfo& module = extension->nacl_modules()[i]; |
1259 RegisterNaClModule(module.url, module.mime_type); | 1261 RegisterNaClModule(module.url, module.mime_type); |
1260 nacl_modules_changed = true; | 1262 nacl_modules_changed = true; |
1261 } | 1263 } |
1262 | 1264 |
1263 if (nacl_modules_changed) | 1265 if (nacl_modules_changed) |
1264 UpdatePluginListWithNaClModules(); | 1266 UpdatePluginListWithNaClModules(); |
1265 | 1267 |
1266 if (plugins_changed || nacl_modules_changed) | 1268 if (plugins_changed || nacl_modules_changed) |
1267 PluginService::GetInstance()->PurgePluginListCache(false); | 1269 PluginService::GetInstance()->PurgePluginListCache(false); |
| 1270 |
| 1271 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) |
| 1272 chromeos::InputMethodLibrary* input_method_library = |
| 1273 chromeos::CrosLibrary::Get()->GetInputMethodLibrary(); |
| 1274 for (std::vector<Extension::InputComponentInfo>::const_iterator component = |
| 1275 extension->input_components().begin(); |
| 1276 component != extension->input_components().end(); |
| 1277 ++component) { |
| 1278 if (component->type == Extension::INPUT_COMPONENT_TYPE_VIRTUAL_KEYBOARD && |
| 1279 !component->layouts.empty()) { |
| 1280 const bool is_system = |
| 1281 !Extension::IsExternalLocation(extension->location()); |
| 1282 input_method_library->RegisterVirtualKeyboard(extension->url(), |
| 1283 component->layouts, |
| 1284 is_system); |
| 1285 } |
| 1286 } |
| 1287 #endif |
1268 } | 1288 } |
1269 | 1289 |
1270 void ExtensionService::NotifyExtensionUnloaded( | 1290 void ExtensionService::NotifyExtensionUnloaded( |
1271 const Extension* extension, UnloadedExtensionInfo::Reason reason) { | 1291 const Extension* extension, UnloadedExtensionInfo::Reason reason) { |
1272 UnloadedExtensionInfo details(extension, reason); | 1292 UnloadedExtensionInfo details(extension, reason); |
1273 NotificationService::current()->Notify( | 1293 NotificationService::current()->Notify( |
1274 NotificationType::EXTENSION_UNLOADED, | 1294 NotificationType::EXTENSION_UNLOADED, |
1275 Source<Profile>(profile_), | 1295 Source<Profile>(profile_), |
1276 Details<UnloadedExtensionInfo>(&details)); | 1296 Details<UnloadedExtensionInfo>(&details)); |
1277 | 1297 |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2331 | 2351 |
2332 ExtensionService::NaClModuleInfoList::iterator | 2352 ExtensionService::NaClModuleInfoList::iterator |
2333 ExtensionService::FindNaClModule(const GURL& url) { | 2353 ExtensionService::FindNaClModule(const GURL& url) { |
2334 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2354 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
2335 iter != nacl_module_list_.end(); ++iter) { | 2355 iter != nacl_module_list_.end(); ++iter) { |
2336 if (iter->url == url) | 2356 if (iter->url == url) |
2337 return iter; | 2357 return iter; |
2338 } | 2358 } |
2339 return nacl_module_list_.end(); | 2359 return nacl_module_list_.end(); |
2340 } | 2360 } |
OLD | NEW |