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

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

Issue 217533006: Introduce apps API target in //apps and move app.runtime API into it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix dependencies (app-runtime-move) Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « apps/launcher.cc ('k') | apps/shell/browser/shell_extensions_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/shell/browser/shell_extension_system.h" 5 #include "apps/shell/browser/shell_extension_system.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "apps/app_window_registry.h" 9 #include "apps/app_window_registry.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 content::Details<const Extension>(extension)); 68 content::Details<const Extension>(extension));
69 69
70 // Inform the rest of the extensions system to start. 70 // Inform the rest of the extensions system to start.
71 ready_.Signal(); 71 ready_.Signal();
72 content::NotificationService::current()->Notify( 72 content::NotificationService::current()->Notify(
73 chrome::NOTIFICATION_EXTENSIONS_READY, 73 chrome::NOTIFICATION_EXTENSIONS_READY,
74 content::Source<BrowserContext>(browser_context_), 74 content::Source<BrowserContext>(browser_context_),
75 content::NotificationService::NoDetails()); 75 content::NotificationService::NoDetails());
76 76
77 // This is effectively the same behavior as 77 // This is effectively the same behavior as
78 // extensions::AppEventRouter::DispatchOnLaunchedEvent without any dependency 78 // apps::AppEventRouter::DispatchOnLaunchedEvent without any dependency
79 // on ExtensionSystem or Profile. 79 // on ExtensionSystem or Profile.
80 scoped_ptr<base::DictionaryValue> launch_data(new base::DictionaryValue()); 80 scoped_ptr<base::DictionaryValue> launch_data(new base::DictionaryValue());
81 launch_data->SetBoolean("isKioskSession", false); 81 launch_data->SetBoolean("isKioskSession", false);
82 scoped_ptr<base::ListValue> event_args(new base::ListValue()); 82 scoped_ptr<base::ListValue> event_args(new base::ListValue());
83 event_args->Append(launch_data.release()); 83 event_args->Append(launch_data.release());
84 scoped_ptr<Event> event( 84 scoped_ptr<Event> event(
85 new Event("app.runtime.onLaunched", event_args.Pass())); 85 new Event("app.runtime.onLaunched", event_args.Pass()));
86 event_router_->DispatchEventWithLazyListener(extension->id(), event.Pass()); 86 event_router_->DispatchEventWithLazyListener(extension->id(), event.Pass());
87 87
88 return true; 88 return true;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void ShellExtensionSystem::UnregisterExtensionWithRequestContexts( 181 void ShellExtensionSystem::UnregisterExtensionWithRequestContexts(
182 const std::string& extension_id, 182 const std::string& extension_id,
183 const UnloadedExtensionInfo::Reason reason) { 183 const UnloadedExtensionInfo::Reason reason) {
184 } 184 }
185 185
186 const OneShotEvent& ShellExtensionSystem::ready() const { 186 const OneShotEvent& ShellExtensionSystem::ready() const {
187 return ready_; 187 return ready_;
188 } 188 }
189 189
190 } // namespace extensions 190 } // namespace extensions
OLDNEW
« no previous file with comments | « apps/launcher.cc ('k') | apps/shell/browser/shell_extensions_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698