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

Unified Diff: extensions/browser/extension_function_dispatcher.cc

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_dispatcher.cc
===================================================================
--- extensions/browser/extension_function_dispatcher.cc (revision 262146)
+++ extensions/browser/extension_function_dispatcher.cc (working copy)
@@ -92,7 +92,8 @@
int request_id,
ExtensionFunction::ResponseType type,
const base::ListValue& results,
- const std::string& error) {
+ const std::string& error,
+ const bool user_gesture) {
DCHECK(ipc_sender);
if (type == ExtensionFunction::BAD_MESSAGE) {
@@ -114,7 +115,7 @@
ipc_sender->Send(new ExtensionMsg_Response(
routing_id, request_id, type == ExtensionFunction::SUCCEEDED, results,
- error));
+ error, user_gesture));
}
void IOThreadResponseCallback(
@@ -123,7 +124,8 @@
int request_id,
ExtensionFunction::ResponseType type,
const base::ListValue& results,
- const std::string& error) {
+ const std::string& error,
+ const bool user_gesture) {
if (!ipc_sender.get())
return;
@@ -133,7 +135,8 @@
request_id,
type,
results,
- error);
+ error,
+ user_gesture);
}
} // namespace
@@ -180,11 +183,12 @@
void OnExtensionFunctionCompleted(int request_id,
ExtensionFunction::ResponseType type,
const base::ListValue& results,
- const std::string& error) {
+ const std::string& error,
+ const bool user_gesture) {
CommonResponseCallback(
render_view_host_, render_view_host_->GetRoutingID(),
render_view_host_->GetProcess()->GetHandle(), request_id, type,
- results, error);
+ results, error, user_gesture);
}
base::WeakPtr<ExtensionFunctionDispatcher> dispatcher_;
@@ -506,7 +510,7 @@
const ExtensionFunction::ResponseCallback& callback) {
base::ListValue empty_list;
callback.Run(ExtensionFunction::FAILED, empty_list,
- "Access to extension API denied.");
+ "Access to extension API denied.", false);
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698