| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |