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

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

Issue 8651001: Move functions out of TOUCH_UI defines. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" 103 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h"
104 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" 104 #include "chrome/browser/chromeos/extensions/input_method_event_router.h"
105 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" 105 #include "chrome/browser/chromeos/extensions/media_player_event_router.h"
106 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 106 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
107 #include "chrome/browser/extensions/extension_input_ime_api.h" 107 #include "chrome/browser/extensions/extension_input_ime_api.h"
108 #include "webkit/fileapi/file_system_context.h" 108 #include "webkit/fileapi/file_system_context.h"
109 #include "webkit/fileapi/file_system_mount_point_provider.h" 109 #include "webkit/fileapi/file_system_mount_point_provider.h"
110 #include "webkit/fileapi/file_system_path_manager.h" 110 #include "webkit/fileapi/file_system_path_manager.h"
111 #endif 111 #endif
112 112
113 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) 113 #if defined(OS_CHROMEOS) && defined(USE_VIRTUAL_KEYBOARD)
114 #include "chrome/browser/extensions/extension_input_ui_api.h" 114 #include "chrome/browser/extensions/extension_input_ui_api.h"
115 #endif 115 #endif
116 116
117 using base::Time; 117 using base::Time;
118 using content::BrowserThread; 118 using content::BrowserThread;
119 119
120 namespace errors = extension_manifest_errors; 120 namespace errors = extension_manifest_errors;
121 121
122 namespace { 122 namespace {
123 123
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 new ExtensionFileBrowserEventRouter(profile_)); 493 new ExtensionFileBrowserEventRouter(profile_));
494 file_browser_event_router_->ObserveFileSystemEvents(); 494 file_browser_event_router_->ObserveFileSystemEvents();
495 495
496 input_method_event_router_.reset( 496 input_method_event_router_.reset(
497 new chromeos::ExtensionInputMethodEventRouter); 497 new chromeos::ExtensionInputMethodEventRouter);
498 498
499 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_); 499 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_);
500 ExtensionInputImeEventRouter::GetInstance()->Init(); 500 ExtensionInputImeEventRouter::GetInstance()->Init();
501 #endif 501 #endif
502 502
503 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) 503 #if defined(OS_CHROMEOS) && defined(USE_VIRTUAL_KEYBOARD)
Peng 2011/11/24 17:11:14 Without it, the extension can not receive any ime
504 ExtensionInputUiEventRouter::GetInstance()->Init(); 504 ExtensionInputUiEventRouter::GetInstance()->Init();
505 #endif 505 #endif
506 506
507 event_routers_initialized_ = true; 507 event_routers_initialized_ = true;
508 } 508 }
509 509
510 const Extension* ExtensionService::GetExtensionById( 510 const Extension* ExtensionService::GetExtensionById(
511 const std::string& id, bool include_disabled) const { 511 const std::string& id, bool include_disabled) const {
512 return GetExtensionByIdInternal(id, true, include_disabled, false); 512 return GetExtensionByIdInternal(id, true, include_disabled, false);
513 } 513 }
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 nacl_modules_changed = true; 996 nacl_modules_changed = true;
997 } 997 }
998 998
999 if (nacl_modules_changed) 999 if (nacl_modules_changed)
1000 UpdatePluginListWithNaClModules(); 1000 UpdatePluginListWithNaClModules();
1001 1001
1002 if (plugins_changed || nacl_modules_changed) 1002 if (plugins_changed || nacl_modules_changed)
1003 PluginService::GetInstance()->PurgePluginListCache(profile_, false); 1003 PluginService::GetInstance()->PurgePluginListCache(profile_, false);
1004 1004
1005 #if defined(OS_CHROMEOS) 1005 #if defined(OS_CHROMEOS)
1006 #if defined(TOUCH_UI) 1006 #if defined(USE_VIRTUAL_KEYBOARD)
1007 chromeos::input_method::InputMethodManager* input_method_manager = 1007 chromeos::input_method::InputMethodManager* input_method_manager =
1008 chromeos::input_method::InputMethodManager::GetInstance(); 1008 chromeos::input_method::InputMethodManager::GetInstance();
1009 #endif 1009 #endif
1010 for (std::vector<Extension::InputComponentInfo>::const_iterator component = 1010 for (std::vector<Extension::InputComponentInfo>::const_iterator component =
1011 extension->input_components().begin(); 1011 extension->input_components().begin();
1012 component != extension->input_components().end(); 1012 component != extension->input_components().end();
1013 ++component) { 1013 ++component) {
1014 if (component->type == Extension::INPUT_COMPONENT_TYPE_IME) { 1014 if (component->type == Extension::INPUT_COMPONENT_TYPE_IME) {
1015 ExtensionInputImeEventRouter::GetInstance()->RegisterIme( 1015 ExtensionInputImeEventRouter::GetInstance()->RegisterIme(
1016 profile_, extension->id(), *component); 1016 profile_, extension->id(), *component);
1017 } 1017 }
1018 #if defined(TOUCH_UI) 1018 #if defined(USE_VIRTUAL_KEYBOARD)
1019 if (component->type == Extension::INPUT_COMPONENT_TYPE_VIRTUAL_KEYBOARD && 1019 if (component->type == Extension::INPUT_COMPONENT_TYPE_VIRTUAL_KEYBOARD &&
1020 !component->layouts.empty()) { 1020 !component->layouts.empty()) {
1021 const bool is_system = 1021 const bool is_system =
1022 !Extension::IsExternalLocation(extension->location()); 1022 !Extension::IsExternalLocation(extension->location());
1023 input_method_manager->RegisterVirtualKeyboard( 1023 input_method_manager->RegisterVirtualKeyboard(
1024 extension->url(), 1024 extension->url(),
1025 component->name, // human-readable name of the keyboard extension. 1025 component->name, // human-readable name of the keyboard extension.
1026 component->layouts, 1026 component->layouts,
1027 is_system); 1027 is_system);
1028 } 1028 }
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 2511
2512 ExtensionService::NaClModuleInfoList::iterator 2512 ExtensionService::NaClModuleInfoList::iterator
2513 ExtensionService::FindNaClModule(const GURL& url) { 2513 ExtensionService::FindNaClModule(const GURL& url) {
2514 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); 2514 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin();
2515 iter != nacl_module_list_.end(); ++iter) { 2515 iter != nacl_module_list_.end(); ++iter) {
2516 if (iter->url == url) 2516 if (iter->url == url)
2517 return iter; 2517 return iter;
2518 } 2518 }
2519 return nacl_module_list_.end(); 2519 return nacl_module_list_.end();
2520 } 2520 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698