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

Side by Side Diff: chrome/browser/extensions/event_router.h

Issue 10821120: Send user gesture to extensions for page and browser action clicks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Profile* restrict_to_profile, 119 Profile* restrict_to_profile,
120 const GURL& event_url, 120 const GURL& event_url,
121 EventFilteringInfo info); 121 EventFilteringInfo info);
122 122
123 // As above, but defaults |info| to EventFilteringInfo(). 123 // As above, but defaults |info| to EventFilteringInfo().
124 void DispatchEventToRenderers(const std::string& event_name, 124 void DispatchEventToRenderers(const std::string& event_name,
125 const std::string& event_args, 125 const std::string& event_args,
126 Profile* restrict_to_profile, 126 Profile* restrict_to_profile,
127 const GURL& event_url); 127 const GURL& event_url);
128 128
129 // As above, but enables sending an explicit user gesture indicator.
130 void DispatchEventToRenderers(const std::string& event_name,
131 const std::string& event_args,
132 Profile* restrict_to_profile,
133 const GURL& event_url,
134 UserGestureState user_gesture);
135
129 // Same as above, except only send the event to the given extension. 136 // Same as above, except only send the event to the given extension.
130 virtual void DispatchEventToExtension(const std::string& extension_id, 137 virtual void DispatchEventToExtension(const std::string& extension_id,
131 const std::string& event_name, 138 const std::string& event_name,
132 const base::Value& event_args, 139 const base::Value& event_args,
133 Profile* restrict_to_profile, 140 Profile* restrict_to_profile,
134 const GURL& event_url); 141 const GURL& event_url);
135 142
136 // This invocation is deprecated. The above variant which uses a Value for 143 // This invocation is deprecated. The above variant which uses a Value for
137 // event_args is to be used instead. 144 // event_args is to be used instead.
138 virtual void DispatchEventToExtension(const std::string& extension_id, 145 virtual void DispatchEventToExtension(const std::string& extension_id,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 Profile* restrict_to_profile, 282 Profile* restrict_to_profile,
276 EventRouter::UserGestureState user_gesture, 283 EventRouter::UserGestureState user_gesture,
277 const EventFilteringInfo& info); 284 const EventFilteringInfo& info);
278 285
279 ~Event(); 286 ~Event();
280 }; 287 };
281 288
282 } // namespace extensions 289 } // namespace extensions
283 290
284 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ 291 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698