OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <iterator> | 8 #include <iterator> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 #include "googleurl/src/gurl.h" | 106 #include "googleurl/src/gurl.h" |
107 #include "grit/generated_resources.h" | 107 #include "grit/generated_resources.h" |
108 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 108 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
109 #include "sync/api/sync_change.h" | 109 #include "sync/api/sync_change.h" |
110 #include "sync/api/sync_error_factory.h" | 110 #include "sync/api/sync_error_factory.h" |
111 #include "webkit/database/database_tracker.h" | 111 #include "webkit/database/database_tracker.h" |
112 #include "webkit/database/database_util.h" | 112 #include "webkit/database/database_util.h" |
113 | 113 |
114 #if defined(OS_CHROMEOS) | 114 #if defined(OS_CHROMEOS) |
115 #include "chrome/browser/chromeos/cros/cros_library.h" | 115 #include "chrome/browser/chromeos/cros/cros_library.h" |
116 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" | |
117 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 116 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
118 #include "content/public/browser/storage_partition.h" | 117 #include "content/public/browser/storage_partition.h" |
119 #include "webkit/fileapi/file_system_context.h" | 118 #include "webkit/fileapi/file_system_context.h" |
120 #include "webkit/fileapi/file_system_mount_point_provider.h" | 119 #include "webkit/fileapi/file_system_mount_point_provider.h" |
121 #endif | 120 #endif |
122 | 121 |
123 using content::BrowserContext; | 122 using content::BrowserContext; |
124 using content::BrowserThread; | 123 using content::BrowserThread; |
125 using content::DevToolsAgentHost; | 124 using content::DevToolsAgentHost; |
126 using content::PluginService; | 125 using content::PluginService; |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 516 |
518 void ExtensionService::InitEventRouters() { | 517 void ExtensionService::InitEventRouters() { |
519 if (event_routers_initialized_) | 518 if (event_routers_initialized_) |
520 return; | 519 return; |
521 | 520 |
522 #if defined(ENABLE_EXTENSIONS) | 521 #if defined(ENABLE_EXTENSIONS) |
523 browser_event_router_.reset(new extensions::BrowserEventRouter(profile_)); | 522 browser_event_router_.reset(new extensions::BrowserEventRouter(profile_)); |
524 | 523 |
525 extensions::ProfileKeyedAPIFactory<extensions::PushMessagingAPI>:: | 524 extensions::ProfileKeyedAPIFactory<extensions::PushMessagingAPI>:: |
526 GetForProfile(profile_); | 525 GetForProfile(profile_); |
527 | |
528 #if defined(OS_CHROMEOS) | |
529 | |
530 ExtensionMediaPlayerEventRouter::GetInstance()->Init(profile_); | |
531 #endif // defined(OS_CHROMEOS) | |
532 #endif // defined(ENABLE_EXTENSIONS) | 526 #endif // defined(ENABLE_EXTENSIONS) |
533 event_routers_initialized_ = true; | 527 event_routers_initialized_ = true; |
534 } | 528 } |
535 | 529 |
536 void ExtensionService::Shutdown() { | 530 void ExtensionService::Shutdown() { |
537 // Do nothing for now. | 531 // Do nothing for now. |
538 } | 532 } |
539 | 533 |
540 const Extension* ExtensionService::GetExtensionById( | 534 const Extension* ExtensionService::GetExtensionById( |
541 const std::string& id, bool include_disabled) const { | 535 const std::string& id, bool include_disabled) const { |
(...skipping 2583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3125 scoped_refptr<const Extension> extension = GetInstalledExtension(*it); | 3119 scoped_refptr<const Extension> extension = GetInstalledExtension(*it); |
3126 DCHECK(extension); | 3120 DCHECK(extension); |
3127 if (!extension) | 3121 if (!extension) |
3128 continue; | 3122 continue; |
3129 blacklisted_extensions_.Insert(extension); | 3123 blacklisted_extensions_.Insert(extension); |
3130 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); | 3124 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); |
3131 } | 3125 } |
3132 | 3126 |
3133 IdentifyAlertableExtensions(); | 3127 IdentifyAlertableExtensions(); |
3134 } | 3128 } |
OLD | NEW |