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

Side by Side Diff: extensions/shell/browser/shell_extension_system.cc

Issue 2212303003: Implement app launch changes for app runtime extension proposal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tool-screenshot
Patch Set: Rebase Created 4 years, 4 months 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
« extensions/common/constants.h ('K') | « extensions/common/constants.h ('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 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
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
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
OLDNEW
« extensions/common/constants.h ('K') | « extensions/common/constants.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698