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

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

Issue 9316102: Update extension events, routing, and delivery to use user gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 6624d98efdf0a1dc2a83a6b6d04c3eefc7f00ea3..45f80c8655b200d6a79fc06d1dbb2c8a89cb89ff 100644
--- a/chrome/browser/extensions/extension_event_router.h
+++ b/chrome/browser/extensions/extension_event_router.h
@@ -34,7 +34,8 @@ class ExtensionEventRouter : public content::NotificationObserver {
const std::string& extension_id,
const std::string& event_name,
const std::string& event_args,
- const GURL& event_url);
+ const GURL& event_url,
+ bool user_caused = false);
Aaron Boodman 2012/02/03 20:18:47 I suggest consistently using the term 'user_gestur
Aaron Boodman 2012/02/03 20:18:47 Also, consider using an enum for this flag, like:
Matt Perry 2012/02/03 20:34:41 Default arguments are forbidden by the style guide
Greg Billock 2012/02/03 22:57:56 My plan was to only set the gesture indicator when
Greg Billock 2012/02/06 22:58:01 Done.
Greg Billock 2012/02/06 22:58:01 Done.
Greg Billock 2012/02/06 22:58:01 Done.
explicit ExtensionEventRouter(Profile* profile);
virtual ~ExtensionEventRouter();
@@ -67,7 +68,8 @@ class ExtensionEventRouter : public content::NotificationObserver {
const std::string& event_name,
const std::string& event_args,
Profile* restrict_to_profile,
- const GURL& event_url);
+ const GURL& event_url,
+ bool user_caused = false);
// Same as above, except only send the event to the given extension.
virtual void DispatchEventToExtension(
@@ -75,7 +77,8 @@ class ExtensionEventRouter : public content::NotificationObserver {
const std::string& event_name,
const std::string& event_args,
Profile* restrict_to_profile,
- const GURL& event_url);
+ const GURL& event_url,
+ bool user_caused = false);
// Send different versions of an event to extensions in different profiles.
// This is used in the case of sending one event to extensions that have
@@ -89,7 +92,8 @@ class ExtensionEventRouter : public content::NotificationObserver {
const std::string& event_args,
Profile* restrict_to_profile,
const std::string& cross_incognito_args,
- const GURL& event_url);
+ const GURL& event_url,
+ bool user_caused = false);
// Record the Event Ack from the renderer. (One less event in-flight.)
void OnExtensionEventAck(const std::string& extension_id);

Powered by Google App Engine
This is Rietveld 408576698