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

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: review comments 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 | « chrome/browser/extensions/extension_input_api.cc ('k') | 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" 105 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h"
106 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" 106 #include "chrome/browser/chromeos/extensions/input_method_event_router.h"
107 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" 107 #include "chrome/browser/chromeos/extensions/media_player_event_router.h"
108 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 108 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
109 #include "chrome/browser/extensions/extension_input_ime_api.h" 109 #include "chrome/browser/extensions/extension_input_ime_api.h"
110 #include "webkit/fileapi/file_system_context.h" 110 #include "webkit/fileapi/file_system_context.h"
111 #include "webkit/fileapi/file_system_mount_point_provider.h" 111 #include "webkit/fileapi/file_system_mount_point_provider.h"
112 #include "webkit/fileapi/file_system_path_manager.h" 112 #include "webkit/fileapi/file_system_path_manager.h"
113 #endif 113 #endif
114 114
115 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) 115 #if defined(OS_CHROMEOS) && defined(USE_VIRTUAL_KEYBOARD)
116 #include "chrome/browser/extensions/extension_input_ui_api.h" 116 #include "chrome/browser/extensions/extension_input_ui_api.h"
117 #endif 117 #endif
118 118
119 using base::Time; 119 using base::Time;
120 using content::BrowserThread; 120 using content::BrowserThread;
121 121
122 namespace errors = extension_manifest_errors; 122 namespace errors = extension_manifest_errors;
123 123
124 namespace { 124 namespace {
125 125
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 new ExtensionFileBrowserEventRouter(profile_)); 501 new ExtensionFileBrowserEventRouter(profile_));
502 file_browser_event_router_->ObserveFileSystemEvents(); 502 file_browser_event_router_->ObserveFileSystemEvents();
503 503
504 input_method_event_router_.reset( 504 input_method_event_router_.reset(
505 new chromeos::ExtensionInputMethodEventRouter); 505 new chromeos::ExtensionInputMethodEventRouter);
506 506
507 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_); 507 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_);
508 ExtensionInputImeEventRouter::GetInstance()->Init(); 508 ExtensionInputImeEventRouter::GetInstance()->Init();
509 #endif 509 #endif
510 510
511 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) 511 #if defined(OS_CHROMEOS) && defined(USE_VIRTUAL_KEYBOARD)
512 ExtensionInputUiEventRouter::GetInstance()->Init(); 512 ExtensionInputUiEventRouter::GetInstance()->Init();
513 #endif 513 #endif
514 514
515 event_routers_initialized_ = true; 515 event_routers_initialized_ = true;
516 } 516 }
517 517
518 const Extension* ExtensionService::GetExtensionById( 518 const Extension* ExtensionService::GetExtensionById(
519 const std::string& id, bool include_disabled) const { 519 const std::string& id, bool include_disabled) const {
520 return GetExtensionByIdInternal(id, true, include_disabled, false); 520 return GetExtensionByIdInternal(id, true, include_disabled, false);
521 } 521 }
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 nacl_modules_changed = true; 1004 nacl_modules_changed = true;
1005 } 1005 }
1006 1006
1007 if (nacl_modules_changed) 1007 if (nacl_modules_changed)
1008 UpdatePluginListWithNaClModules(); 1008 UpdatePluginListWithNaClModules();
1009 1009
1010 if (plugins_changed || nacl_modules_changed) 1010 if (plugins_changed || nacl_modules_changed)
1011 PluginService::GetInstance()->PurgePluginListCache(profile_, false); 1011 PluginService::GetInstance()->PurgePluginListCache(profile_, false);
1012 1012
1013 #if defined(OS_CHROMEOS) 1013 #if defined(OS_CHROMEOS)
1014 #if defined(TOUCH_UI) 1014 #if defined(USE_VIRTUAL_KEYBOARD)
1015 chromeos::input_method::InputMethodManager* input_method_manager = 1015 chromeos::input_method::InputMethodManager* input_method_manager =
Aaron Boodman 2011/12/02 20:13:58 Move this closer to where it is used, to reduce th
1016 chromeos::input_method::InputMethodManager::GetInstance(); 1016 chromeos::input_method::InputMethodManager::GetInstance();
1017 #endif 1017 #endif
1018 for (std::vector<Extension::InputComponentInfo>::const_iterator component = 1018 for (std::vector<Extension::InputComponentInfo>::const_iterator component =
1019 extension->input_components().begin(); 1019 extension->input_components().begin();
1020 component != extension->input_components().end(); 1020 component != extension->input_components().end();
1021 ++component) { 1021 ++component) {
1022 if (component->type == Extension::INPUT_COMPONENT_TYPE_IME) { 1022 if (component->type == Extension::INPUT_COMPONENT_TYPE_IME) {
1023 ExtensionInputImeEventRouter::GetInstance()->RegisterIme( 1023 ExtensionInputImeEventRouter::GetInstance()->RegisterIme(
1024 profile_, extension->id(), *component); 1024 profile_, extension->id(), *component);
1025 } 1025 }
1026 #if defined(TOUCH_UI) 1026 #if defined(USE_VIRTUAL_KEYBOARD)
1027 if (component->type == Extension::INPUT_COMPONENT_TYPE_VIRTUAL_KEYBOARD && 1027 if (component->type == Extension::INPUT_COMPONENT_TYPE_VIRTUAL_KEYBOARD &&
1028 !component->layouts.empty()) { 1028 !component->layouts.empty()) {
1029 const bool is_system = 1029 const bool is_system =
Aaron Boodman 2011/12/02 20:13:58 What is is_system supposed to mean? There might be
1030 !Extension::IsExternalLocation(extension->location()); 1030 !Extension::IsExternalLocation(extension->location());
1031 input_method_manager->RegisterVirtualKeyboard( 1031 input_method_manager->RegisterVirtualKeyboard(
1032 extension->url(), 1032 extension->url(),
1033 component->name, // human-readable name of the keyboard extension. 1033 component->name, // human-readable name of the keyboard extension.
1034 component->layouts, 1034 component->layouts,
1035 is_system); 1035 is_system);
1036 } 1036 }
1037 #endif 1037 #endif
1038 } 1038 }
1039 #endif 1039 #endif
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2517 2517
2518 ExtensionService::NaClModuleInfoList::iterator 2518 ExtensionService::NaClModuleInfoList::iterator
2519 ExtensionService::FindNaClModule(const GURL& url) { 2519 ExtensionService::FindNaClModule(const GURL& url) {
2520 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); 2520 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin();
2521 iter != nacl_module_list_.end(); ++iter) { 2521 iter != nacl_module_list_.end(); ++iter) {
2522 if (iter->url == url) 2522 if (iter->url == url)
2523 return iter; 2523 return iter;
2524 } 2524 }
2525 return nacl_module_list_.end(); 2525 return nacl_module_list_.end();
2526 } 2526 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_input_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698