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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 #include "webkit/database/database_util.h" | 80 #include "webkit/database/database_util.h" |
81 #include "webkit/plugins/npapi/plugin_list.h" | 81 #include "webkit/plugins/npapi/plugin_list.h" |
82 | 82 |
83 #if defined(OS_CHROMEOS) | 83 #if defined(OS_CHROMEOS) |
84 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" | 84 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" |
85 #include "webkit/fileapi/file_system_context.h" | 85 #include "webkit/fileapi/file_system_context.h" |
86 #include "webkit/fileapi/file_system_mount_point_provider.h" | 86 #include "webkit/fileapi/file_system_mount_point_provider.h" |
87 #include "webkit/fileapi/file_system_path_manager.h" | 87 #include "webkit/fileapi/file_system_path_manager.h" |
88 #endif | 88 #endif |
89 | 89 |
90 #if defined(TOUCH_UI) | |
Yusuke Sato
2011/05/02 07:33:31
#if defined(OS_CHROMEOS) && defined(TOUCH_UI) migh
| |
91 #include "chrome/browser/extensions/extension_input_ui_api.h" | |
92 #endif | |
93 | |
90 using base::Time; | 94 using base::Time; |
91 | 95 |
92 namespace errors = extension_manifest_errors; | 96 namespace errors = extension_manifest_errors; |
93 | 97 |
94 namespace { | 98 namespace { |
95 | 99 |
96 #if defined(OS_LINUX) | 100 #if defined(OS_LINUX) |
97 static const int kOmniboxIconPaddingLeft = 2; | 101 static const int kOmniboxIconPaddingLeft = 2; |
98 static const int kOmniboxIconPaddingRight = 2; | 102 static const int kOmniboxIconPaddingRight = 2; |
99 #elif defined(OS_MACOSX) | 103 #elif defined(OS_MACOSX) |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 ExtensionAccessibilityEventRouter::GetInstance()->ObserveProfile(profile_); | 537 ExtensionAccessibilityEventRouter::GetInstance()->ObserveProfile(profile_); |
534 browser_event_router_.reset(new ExtensionBrowserEventRouter(profile_)); | 538 browser_event_router_.reset(new ExtensionBrowserEventRouter(profile_)); |
535 browser_event_router_->Init(); | 539 browser_event_router_->Init(); |
536 preference_event_router_.reset(new ExtensionPreferenceEventRouter(profile_)); | 540 preference_event_router_.reset(new ExtensionPreferenceEventRouter(profile_)); |
537 ExtensionBookmarkEventRouter::GetInstance()->Observe( | 541 ExtensionBookmarkEventRouter::GetInstance()->Observe( |
538 profile_->GetBookmarkModel()); | 542 profile_->GetBookmarkModel()); |
539 ExtensionCookiesEventRouter::GetInstance()->Init(); | 543 ExtensionCookiesEventRouter::GetInstance()->Init(); |
540 ExtensionManagementEventRouter::GetInstance()->Init(); | 544 ExtensionManagementEventRouter::GetInstance()->Init(); |
541 ExtensionProcessesEventRouter::GetInstance()->ObserveProfile(profile_); | 545 ExtensionProcessesEventRouter::GetInstance()->ObserveProfile(profile_); |
542 ExtensionWebNavigationEventRouter::GetInstance()->Init(); | 546 ExtensionWebNavigationEventRouter::GetInstance()->Init(); |
547 | |
543 #if defined(OS_CHROMEOS) | 548 #if defined(OS_CHROMEOS) |
544 ExtensionFileBrowserEventRouter::GetInstance()->ObserveFileSystemEvents( | 549 ExtensionFileBrowserEventRouter::GetInstance()->ObserveFileSystemEvents( |
545 profile_); | 550 profile_); |
546 #endif | 551 #endif |
552 | |
553 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) | |
554 ExtensionInputUiEventRouter::GetInstance()->Init(); | |
555 #endif | |
556 | |
547 event_routers_initialized_ = true; | 557 event_routers_initialized_ = true; |
548 } | 558 } |
549 | 559 |
550 const Extension* ExtensionService::GetExtensionById( | 560 const Extension* ExtensionService::GetExtensionById( |
551 const std::string& id, bool include_disabled) const { | 561 const std::string& id, bool include_disabled) const { |
552 return GetExtensionByIdInternal(id, true, include_disabled); | 562 return GetExtensionByIdInternal(id, true, include_disabled); |
553 } | 563 } |
554 | 564 |
555 void ExtensionService::Init() { | 565 void ExtensionService::Init() { |
556 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 566 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2191 | 2201 |
2192 ExtensionService::NaClModuleInfoList::iterator | 2202 ExtensionService::NaClModuleInfoList::iterator |
2193 ExtensionService::FindNaClModule(const GURL& url) { | 2203 ExtensionService::FindNaClModule(const GURL& url) { |
2194 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2204 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
2195 iter != nacl_module_list_.end(); ++iter) { | 2205 iter != nacl_module_list_.end(); ++iter) { |
2196 if (iter->url == url) | 2206 if (iter->url == url) |
2197 return iter; | 2207 return iter; |
2198 } | 2208 } |
2199 return nacl_module_list_.end(); | 2209 return nacl_module_list_.end(); |
2200 } | 2210 } |
OLD | NEW |