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

Unified Diff: chrome/browser/extensions/extension_event_router.h

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.h
diff --git a/chrome/browser/extensions/extension_event_router.h b/chrome/browser/extensions/extension_event_router.h
index 4bcfc0e2e76487923d249a96cd2057b9081fb581..60a0f349eb2d43157ea37f6c440c22f116286d58 100644
--- a/chrome/browser/extensions/extension_event_router.h
+++ b/chrome/browser/extensions/extension_event_router.h
@@ -46,16 +46,7 @@ class ExtensionEventRouter : public content::NotificationObserver {
static void DispatchEvent(IPC::Sender* ipc_sender,
const std::string& extension_id,
const std::string& event_name,
- const base::Value& event_args,
- const GURL& event_url,
- UserGestureState user_gesture);
-
- // This invocation is deprecated. All future consumers of this API should be
- // sending Values as event arguments, using the above version.
- static void DispatchEvent(IPC::Sender* ipc_sender,
- const std::string& extension_id,
- const std::string& event_name,
- const std::string& event_args,
+ base::ListValue* event_args,
const GURL& event_url,
UserGestureState user_gesture);
@@ -97,7 +88,7 @@ class ExtensionEventRouter : public content::NotificationObserver {
// permissions for this url.
void DispatchEventToRenderers(
const std::string& event_name,
- const std::string& event_args,
+ base::ListValue* event_args,
Profile* restrict_to_profile,
const GURL& event_url);
@@ -105,16 +96,7 @@ class ExtensionEventRouter : public content::NotificationObserver {
virtual void DispatchEventToExtension(
const std::string& extension_id,
const std::string& event_name,
- const base::Value& event_args,
- Profile* restrict_to_profile,
- const GURL& event_url);
-
- // This invocation is deprecated. The above variant which uses a Value for
- // event_args is to be used instead.
- virtual void DispatchEventToExtension(
- 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);
@@ -123,7 +105,7 @@ class ExtensionEventRouter : public content::NotificationObserver {
virtual void DispatchEventToExtension(
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,
UserGestureState user_gesture);
@@ -137,9 +119,9 @@ class ExtensionEventRouter : public content::NotificationObserver {
// extensions in that profile that can't cross incognito.
void DispatchEventsToRenderersAcrossIncognito(
const std::string& event_name,
- const std::string& event_args,
+ base::ListValue* event_args,
Profile* restrict_to_profile,
- const std::string& cross_incognito_args,
+ base::ListValue* cross_incognito_args,
const GURL& event_url);
// Record the Event Ack from the renderer. (One less event in-flight.)
@@ -187,7 +169,7 @@ class ExtensionEventRouter : public content::NotificationObserver {
Profile* profile,
const extensions::Extension* extension,
const linked_ptr<ExtensionEvent>& event,
- const base::Value** event_args);
+ base::ListValue** event_args);
// Ensures that all lazy background pages that are interested in the given
// event are loaded, and queues the event if the page is not ready yet.

Powered by Google App Engine
This is Rietveld 408576698