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

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 8770057: Fixes: http://codereview.chromium.org/8651001/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 nacl_modules_changed = true; 1006 nacl_modules_changed = true;
1007 } 1007 }
1008 1008
1009 if (nacl_modules_changed) 1009 if (nacl_modules_changed)
1010 UpdatePluginListWithNaClModules(); 1010 UpdatePluginListWithNaClModules();
1011 1011
1012 if (plugins_changed || nacl_modules_changed) 1012 if (plugins_changed || nacl_modules_changed)
1013 PluginService::GetInstance()->PurgePluginListCache(profile_, false); 1013 PluginService::GetInstance()->PurgePluginListCache(profile_, false);
1014 1014
1015 #if defined(OS_CHROMEOS) 1015 #if defined(OS_CHROMEOS)
1016 #if defined(USE_VIRTUAL_KEYBOARD)
1017 chromeos::input_method::InputMethodManager* input_method_manager =
1018 chromeos::input_method::InputMethodManager::GetInstance();
1019 #endif
1020 for (std::vector<Extension::InputComponentInfo>::const_iterator component = 1016 for (std::vector<Extension::InputComponentInfo>::const_iterator component =
1021 extension->input_components().begin(); 1017 extension->input_components().begin();
1022 component != extension->input_components().end(); 1018 component != extension->input_components().end();
1023 ++component) { 1019 ++component) {
1024 if (component->type == Extension::INPUT_COMPONENT_TYPE_IME) { 1020 if (component->type == Extension::INPUT_COMPONENT_TYPE_IME) {
1025 ExtensionInputImeEventRouter::GetInstance()->RegisterIme( 1021 ExtensionInputImeEventRouter::GetInstance()->RegisterIme(
1026 profile_, extension->id(), *component); 1022 profile_, extension->id(), *component);
1027 } 1023 }
1028 #if defined(USE_VIRTUAL_KEYBOARD) 1024 #if defined(USE_VIRTUAL_KEYBOARD)
1029 if (component->type == Extension::INPUT_COMPONENT_TYPE_VIRTUAL_KEYBOARD && 1025 if (component->type == Extension::INPUT_COMPONENT_TYPE_VIRTUAL_KEYBOARD &&
1030 !component->layouts.empty()) { 1026 !component->layouts.empty()) {
1031 const bool is_system = 1027 chromeos::input_method::InputMethodManager* input_method_manager =
1032 !Extension::IsExternalLocation(extension->location()); 1028 chromeos::input_method::InputMethodManager::GetInstance();
1029 const bool is_system_keyboard =
1030 extension->location() == Extension::COMPONENT;
1033 input_method_manager->RegisterVirtualKeyboard( 1031 input_method_manager->RegisterVirtualKeyboard(
1034 extension->url(), 1032 extension->url(),
1035 component->name, // human-readable name of the keyboard extension. 1033 component->name, // human-readable name of the keyboard extension.
1036 component->layouts, 1034 component->layouts,
1037 is_system); 1035 is_system_keyboard);
1038 } 1036 }
1039 #endif 1037 #endif
1040 } 1038 }
1041 #endif 1039 #endif
1042 } 1040 }
1043 1041
1044 void ExtensionService::NotifyExtensionUnloaded( 1042 void ExtensionService::NotifyExtensionUnloaded(
1045 const Extension* extension, 1043 const Extension* extension,
1046 extension_misc::UnloadedExtensionReason reason) { 1044 extension_misc::UnloadedExtensionReason reason) {
1047 UnloadedExtensionInfo details(extension, reason); 1045 UnloadedExtensionInfo details(extension, reason);
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
2521 2519
2522 ExtensionService::NaClModuleInfoList::iterator 2520 ExtensionService::NaClModuleInfoList::iterator
2523 ExtensionService::FindNaClModule(const GURL& url) { 2521 ExtensionService::FindNaClModule(const GURL& url) {
2524 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); 2522 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin();
2525 iter != nacl_module_list_.end(); ++iter) { 2523 iter != nacl_module_list_.end(); ++iter) {
2526 if (iter->url == url) 2524 if (iter->url == url)
2527 return iter; 2525 return iter;
2528 } 2526 }
2529 return nacl_module_list_.end(); 2527 return nacl_module_list_.end();
2530 } 2528 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698