Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/shell/browser/shell_extension_system.h" | 5 #include "extensions/shell/browser/shell_extension_system.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 } | 88 } |
| 89 | 89 |
| 90 void ShellExtensionSystem::LaunchApp(const ExtensionId& extension_id) { | 90 void ShellExtensionSystem::LaunchApp(const ExtensionId& extension_id) { |
| 91 // Send the onLaunched event. | 91 // Send the onLaunched event. |
| 92 DCHECK(ExtensionRegistry::Get(browser_context_) | 92 DCHECK(ExtensionRegistry::Get(browser_context_) |
| 93 ->enabled_extensions() | 93 ->enabled_extensions() |
| 94 .Contains(extension_id)); | 94 .Contains(extension_id)); |
| 95 const Extension* extension = ExtensionRegistry::Get(browser_context_) | 95 const Extension* extension = ExtensionRegistry::Get(browser_context_) |
| 96 ->enabled_extensions() | 96 ->enabled_extensions() |
| 97 .GetByID(extension_id); | 97 .GetByID(extension_id); |
| 98 AppRuntimeEventRouter::DispatchOnLaunchedEvent( | 98 AppRuntimeEventRouter::DispatchOnLaunchedEvent(browser_context_, extension, |
| 99 browser_context_, extension, extensions::SOURCE_UNTRACKED); | 99 extensions::SOURCE_UNTRACKED, |
|
Devlin
2016/08/11 20:51:21
no need for extensions::
jdufault
2016/08/12 18:56:55
Done.
| |
| 100 base::Optional<ActionData>()); | |
| 100 } | 101 } |
| 101 | 102 |
| 102 void ShellExtensionSystem::Shutdown() { | 103 void ShellExtensionSystem::Shutdown() { |
| 103 } | 104 } |
| 104 | 105 |
| 105 void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { | 106 void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { |
| 106 service_worker_manager_.reset(new ServiceWorkerManager(browser_context_)); | 107 service_worker_manager_.reset(new ServiceWorkerManager(browser_context_)); |
| 107 runtime_data_.reset( | 108 runtime_data_.reset( |
| 108 new RuntimeData(ExtensionRegistry::Get(browser_context_))); | 109 new RuntimeData(ExtensionRegistry::Get(browser_context_))); |
| 109 quota_service_.reset(new QuotaService); | 110 quota_service_.reset(new QuotaService); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 } | 192 } |
| 192 | 193 |
| 193 void ShellExtensionSystem::OnExtensionRegisteredWithRequestContexts( | 194 void ShellExtensionSystem::OnExtensionRegisteredWithRequestContexts( |
| 194 scoped_refptr<Extension> extension) { | 195 scoped_refptr<Extension> extension) { |
| 195 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); | 196 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); |
| 196 registry->AddReady(extension); | 197 registry->AddReady(extension); |
| 197 registry->TriggerOnReady(extension.get()); | 198 registry->TriggerOnReady(extension.get()); |
| 198 } | 199 } |
| 199 | 200 |
| 200 } // namespace extensions | 201 } // namespace extensions |
| OLD | NEW |