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

Unified Diff: chrome/browser/extensions/extension_event_router_forwarder.cc

Issue 10694085: Refactor extension event distribution to use Values instead of JSON strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_event_router_forwarder.cc
diff --git a/chrome/browser/extensions/extension_event_router_forwarder.cc b/chrome/browser/extensions/extension_event_router_forwarder.cc
index f654d1299bdf091b0138dde2c76c5dd0495cef9e..f0c34d932f06fc0edae760fc70f2112e6fa1da30 100644
--- a/chrome/browser/extensions/extension_event_router_forwarder.cc
+++ b/chrome/browser/extensions/extension_event_router_forwarder.cc
@@ -1,10 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_event_router_forwarder.h"
#include "base/bind.h"
+#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_event_router.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -20,14 +21,14 @@ ExtensionEventRouterForwarder::~ExtensionEventRouterForwarder() {
void ExtensionEventRouterForwarder::BroadcastEventToRenderers(
const std::string& event_name,
- const std::string& event_args,
+ base::ListValue* event_args,
const GURL& event_url) {
HandleEvent("", event_name, event_args, 0, true, event_url);
}
void ExtensionEventRouterForwarder::DispatchEventToRenderers(
const std::string& event_name,
- const std::string& event_args,
+ base::ListValue* event_args,
void* profile,
bool use_profile_to_restrict_events,
const GURL& event_url) {
@@ -40,7 +41,7 @@ void ExtensionEventRouterForwarder::DispatchEventToRenderers(
void ExtensionEventRouterForwarder::BroadcastEventToExtension(
const std::string& extension_id,
const std::string& event_name,
- const std::string& event_args,
+ base::ListValue* event_args,
const GURL& event_url) {
HandleEvent(extension_id, event_name, event_args, 0, true, event_url);
}
@@ -48,7 +49,7 @@ void ExtensionEventRouterForwarder::BroadcastEventToExtension(
void ExtensionEventRouterForwarder::DispatchEventToExtension(
const std::string& extension_id,
const std::string& event_name,
- const std::string& event_args,
+ base::ListValue* event_args,
void* profile,
bool use_profile_to_restrict_events,
const GURL& event_url) {
@@ -61,7 +62,7 @@ void ExtensionEventRouterForwarder::DispatchEventToExtension(
void ExtensionEventRouterForwarder::HandleEvent(
const std::string& extension_id,
const std::string& event_name,
- const std::string& event_args,
+ base::ListValue* event_args,
void* profile_ptr,
bool use_profile_to_restrict_events,
const GURL& event_url) {
@@ -102,7 +103,7 @@ void ExtensionEventRouterForwarder::CallExtensionEventRouter(
Profile* profile,
const std::string& extension_id,
const std::string& event_name,
- const std::string& event_args,
+ base::ListValue* event_args,
Profile* restrict_to_profile,
const GURL& event_url) {
// We may not have an extension in cases like chromeos login

Powered by Google App Engine
This is Rietveld 408576698