| 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/browser.h" | |
| 15 #include "chrome/browser/extensions/extension_event_names.h" | 14 #include "chrome/browser/extensions/extension_event_names.h" |
| 16 #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" |
| 17 #include "chrome/browser/extensions/extension_updater.h" | 17 #include "chrome/browser/extensions/extension_updater.h" |
| 18 #include "chrome/browser/extensions/extensions_service.h" | |
| 19 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profile.h" |
| 20 #include "chrome/common/extensions/extension.h" | 19 #include "chrome/browser/ui/browser.h" |
| 21 #include "chrome/common/extensions/extension_constants.h" | 20 #include "chrome/common/extensions/extension_constants.h" |
| 22 #include "chrome/common/extensions/extension_error_utils.h" | 21 #include "chrome/common/extensions/extension_error_utils.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/notification_service.h" | 24 #include "chrome/common/notification_service.h" |
| 25 #include "chrome/common/notification_type.h" | 25 #include "chrome/common/notification_type.h" |
| 26 | 26 |
| 27 using base::IntToString; | 27 using base::IntToString; |
| 28 namespace events = extension_event_names; | 28 namespace events = extension_event_names; |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 const char kAppLaunchUrlKey[] = "appLaunchUrl"; | 32 const char kAppLaunchUrlKey[] = "appLaunchUrl"; |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 bool enabled = service->GetExtensionById(extension->id(), false) != NULL; | 243 bool enabled = service->GetExtensionById(extension->id(), false) != NULL; |
| 244 args.Append(CreateExtensionInfo(*extension, enabled)); | 244 args.Append(CreateExtensionInfo(*extension, enabled)); |
| 245 } | 245 } |
| 246 | 246 |
| 247 std::string args_json; | 247 std::string args_json; |
| 248 base::JSONWriter::Write(&args, false /* pretty_print */, &args_json); | 248 base::JSONWriter::Write(&args, false /* pretty_print */, &args_json); |
| 249 | 249 |
| 250 profile->GetExtensionEventRouter()->DispatchEventToRenderers( | 250 profile->GetExtensionEventRouter()->DispatchEventToRenderers( |
| 251 event_name, args_json, NULL, GURL()); | 251 event_name, args_json, NULL, GURL()); |
| 252 } | 252 } |
| OLD | NEW |