OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/app/app_api.h" | 5 #include "chrome/browser/extensions/api/app/app_api.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/extensions/app_notification_manager.h" | 12 #include "chrome/browser/extensions/app_notification_manager.h" |
13 #include "chrome/browser/extensions/extension_event_router.h" | 13 #include "chrome/browser/extensions/event_router.h" |
14 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/common/chrome_notification_types.h" | 16 #include "chrome/common/chrome_notification_types.h" |
17 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
18 #include "chrome/common/extensions/extension_constants.h" | 18 #include "chrome/common/extensions/extension_constants.h" |
19 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
21 #include "webkit/glue/web_intent_data.h" | 21 #include "webkit/glue/web_intent_data.h" |
22 | 22 |
23 namespace { | 23 namespace { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 NOTREACHED(); | 181 NOTREACHED(); |
182 break; | 182 break; |
183 } | 183 } |
184 std::string json_args; | 184 std::string json_args; |
185 base::JSONWriter::Write(&args, &json_args); | 185 base::JSONWriter::Write(&args, &json_args); |
186 profile->GetExtensionEventRouter()->DispatchEventToExtension( | 186 profile->GetExtensionEventRouter()->DispatchEventToExtension( |
187 extension->id(), kOnLaunchedEvent, json_args, NULL, GURL()); | 187 extension->id(), kOnLaunchedEvent, json_args, NULL, GURL()); |
188 } | 188 } |
189 | 189 |
190 } // namespace extensions | 190 } // namespace extensions |
OLD | NEW |