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

Unified Diff: extensions/browser/extension_function.h

Issue 227413008: Add the feature to retain the user gesture in the extension callback (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 6 years, 8 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: extensions/browser/extension_function.h
===================================================================
--- extensions/browser/extension_function.h (revision 262146)
+++ extensions/browser/extension_function.h (working copy)
@@ -95,7 +95,9 @@
typedef base::Callback<void(ResponseType type,
const base::ListValue& results,
- const std::string& error)> ResponseCallback;
+ const std::string& error,
+ const bool retain_user_gesture)>
+ ResponseCallback;
ExtensionFunction();
@@ -182,6 +184,11 @@
void set_user_gesture(bool user_gesture) { user_gesture_ = user_gesture; }
bool user_gesture() const { return user_gesture_; }
+ void set_retain_user_gesture(bool retain_user_gesture) {
+ retain_user_gesture_ = retain_user_gesture;
+ }
+ bool retain_user_gesture() const { return retain_user_gesture_; }
+
void set_histogram_value(
extensions::functions::HistogramValue histogram_value) {
histogram_value_ = histogram_value; }
@@ -245,6 +252,9 @@
// True if the call was made in response of user gesture.
bool user_gesture_;
+ // True if the response callback should include a user gesture.
not at google - send to devlin 2014/04/09 16:44:32 True if the response callback should retain the |u
+ bool retain_user_gesture_;
+
// The arguments to the API. Only non-null if argument were specified.
scoped_ptr<base::ListValue> args_;

Powered by Google App Engine
This is Rietveld 408576698