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

Side by Side Diff: chrome/browser/extensions/extension_function_dispatcher.cc

Issue 145463002: Extensions: Send the tab id to platform apps. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix null pointer deref Created 6 years, 10 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 #include "chrome/browser/extensions/extension_function_dispatcher.h" 5 #include "chrome/browser/extensions/extension_function_dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 498 }
499 499
500 function->SetArgs(&params.arguments); 500 function->SetArgs(&params.arguments);
501 function->set_source_url(params.source_url); 501 function->set_source_url(params.source_url);
502 function->set_request_id(params.request_id); 502 function->set_request_id(params.request_id);
503 function->set_has_callback(params.has_callback); 503 function->set_has_callback(params.has_callback);
504 function->set_user_gesture(params.user_gesture); 504 function->set_user_gesture(params.user_gesture);
505 function->set_extension(extension); 505 function->set_extension(extension);
506 function->set_profile_id(profile); 506 function->set_profile_id(profile);
507 function->set_response_callback(callback); 507 function->set_response_callback(callback);
508 function->set_source_tab_id(params.source_tab_id);
508 509
509 return function; 510 return function;
510 } 511 }
511 512
512 // static 513 // static
513 void ExtensionFunctionDispatcher::SendAccessDenied( 514 void ExtensionFunctionDispatcher::SendAccessDenied(
514 const ExtensionFunction::ResponseCallback& callback) { 515 const ExtensionFunction::ResponseCallback& callback) {
515 base::ListValue empty_list; 516 base::ListValue empty_list;
516 callback.Run(ExtensionFunction::FAILED, empty_list, 517 callback.Run(ExtensionFunction::FAILED, empty_list,
517 "Access to extension API denied."); 518 "Access to extension API denied.");
518 } 519 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/messaging/message_service.cc ('k') | chrome/common/extensions/extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698