OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extension_management_api.h" | 5 #include "chrome/browser/extensions/extension_management_api.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "chrome/browser/extensions/extension_event_names.h" | 14 #include "chrome/browser/extensions/extension_event_names.h" |
15 #include "chrome/browser/extensions/extension_event_router.h" | 15 #include "chrome/browser/extensions/extension_event_router.h" |
16 #include "chrome/browser/extensions/extensions_service.h" | 16 #include "chrome/browser/extensions/extensions_service.h" |
17 #include "chrome/browser/extensions/extension_updater.h" | 17 #include "chrome/browser/extensions/extension_updater.h" |
18 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
20 #include "chrome/common/extensions/extension_constants.h" | 20 #include "chrome/common/extensions/extension_constants.h" |
21 #include "chrome/common/extensions/extension_error_utils.h" | 21 #include "chrome/common/extensions/extension_error_utils.h" |
22 #include "chrome/common/extensions/extension.h" | 22 #include "chrome/common/extensions/extension.h" |
23 #include "chrome/common/extensions/extension_icon_set.h" | 23 #include "chrome/common/extensions/extension_icon_set.h" |
24 #include "chrome/common/extensions/url_pattern.h" | 24 #include "chrome/common/extensions/url_pattern.h" |
25 #include "chrome/common/notification_service.h" | 25 #include "chrome/common/notification_service.h" |
26 #include "chrome/common/notification_type.h" | 26 #include "chrome/common/notification_type.h" |
27 | 27 |
28 using base::IntToString; | 28 using base::IntToString; |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 bool enabled = service->GetExtensionById(extension->id(), false) != NULL; | 273 bool enabled = service->GetExtensionById(extension->id(), false) != NULL; |
274 args.Append(CreateExtensionInfo(*extension, enabled)); | 274 args.Append(CreateExtensionInfo(*extension, enabled)); |
275 } | 275 } |
276 | 276 |
277 std::string args_json; | 277 std::string args_json; |
278 base::JSONWriter::Write(&args, false /* pretty_print */, &args_json); | 278 base::JSONWriter::Write(&args, false /* pretty_print */, &args_json); |
279 | 279 |
280 profile->GetExtensionEventRouter()->DispatchEventToRenderers( | 280 profile->GetExtensionEventRouter()->DispatchEventToRenderers( |
281 event_name, args_json, NULL, GURL()); | 281 event_name, args_json, NULL, GURL()); |
282 } | 282 } |
OLD | NEW |