| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 void ShellExtensionSystem::LaunchApp(const ExtensionId& extension_id) { | 91 void ShellExtensionSystem::LaunchApp(const ExtensionId& extension_id) { |
| 92 // Send the onLaunched event. | 92 // Send the onLaunched event. |
| 93 DCHECK(ExtensionRegistry::Get(browser_context_) | 93 DCHECK(ExtensionRegistry::Get(browser_context_) |
| 94 ->enabled_extensions() | 94 ->enabled_extensions() |
| 95 .Contains(extension_id)); | 95 .Contains(extension_id)); |
| 96 const Extension* extension = ExtensionRegistry::Get(browser_context_) | 96 const Extension* extension = ExtensionRegistry::Get(browser_context_) |
| 97 ->enabled_extensions() | 97 ->enabled_extensions() |
| 98 .GetByID(extension_id); | 98 .GetByID(extension_id); |
| 99 AppRuntimeEventRouter::DispatchOnLaunchedEvent( | 99 AppRuntimeEventRouter::DispatchOnLaunchedEvent( |
| 100 browser_context_, extension, SOURCE_UNTRACKED, | 100 browser_context_, extension, SOURCE_UNTRACKED, |
| 101 std::unique_ptr<api::app_runtime::ActionData>()); | 101 std::unique_ptr<api::app_runtime::LaunchData>()); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void ShellExtensionSystem::Shutdown() { | 104 void ShellExtensionSystem::Shutdown() { |
| 105 } | 105 } |
| 106 | 106 |
| 107 void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { | 107 void ShellExtensionSystem::InitForRegularProfile(bool extensions_enabled) { |
| 108 service_worker_manager_.reset(new ServiceWorkerManager(browser_context_)); | 108 service_worker_manager_.reset(new ServiceWorkerManager(browser_context_)); |
| 109 runtime_data_.reset( | 109 runtime_data_.reset( |
| 110 new RuntimeData(ExtensionRegistry::Get(browser_context_))); | 110 new RuntimeData(ExtensionRegistry::Get(browser_context_))); |
| 111 quota_service_.reset(new QuotaService); | 111 quota_service_.reset(new QuotaService); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 } | 193 } |
| 194 | 194 |
| 195 void ShellExtensionSystem::OnExtensionRegisteredWithRequestContexts( | 195 void ShellExtensionSystem::OnExtensionRegisteredWithRequestContexts( |
| 196 scoped_refptr<Extension> extension) { | 196 scoped_refptr<Extension> extension) { |
| 197 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); | 197 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); |
| 198 registry->AddReady(extension); | 198 registry->AddReady(extension); |
| 199 registry->TriggerOnReady(extension.get()); | 199 registry->TriggerOnReady(extension.get()); |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace extensions | 202 } // namespace extensions |
| OLD | NEW |