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

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

Issue 10566018: Initial work to remove the notion of all extension message payloads as strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review changes. Created 8 years, 6 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 bbb3e22d4858e9803d1621496229333ff83acc4a..4bcfc0e2e76487923d249a96cd2057b9081fb581 100644
--- a/chrome/browser/extensions/extension_event_router.h
+++ b/chrome/browser/extensions/extension_event_router.h
@@ -13,6 +13,7 @@
#include "base/compiler_specific.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
+#include "base/values.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "ipc/ipc_sender.h"
@@ -45,6 +46,15 @@ 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,
const GURL& event_url,
UserGestureState user_gesture);
@@ -95,6 +105,15 @@ 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,
Profile* restrict_to_profile,
const GURL& event_url);
@@ -168,7 +187,7 @@ class ExtensionEventRouter : public content::NotificationObserver {
Profile* profile,
const extensions::Extension* extension,
const linked_ptr<ExtensionEvent>& event,
- const std::string** event_args);
+ const base::Value** 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.
« no previous file with comments | « chrome/browser/extensions/api/api_resource_event_notifier.cc ('k') | chrome/browser/extensions/extension_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698