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

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

Issue 426593007: Refactor guest view availability to be API not permission based. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MostLikelyContextType Created 6 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
« no previous file with comments | « extensions/browser/event_router.cc ('k') | extensions/browser/process_map.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/extension_function_dispatcher.h" 5 #include "extensions/browser/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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 function->SetArgs(&params.arguments); 448 function->SetArgs(&params.arguments);
449 function->set_source_url(params.source_url); 449 function->set_source_url(params.source_url);
450 function->set_request_id(params.request_id); 450 function->set_request_id(params.request_id);
451 function->set_has_callback(params.has_callback); 451 function->set_has_callback(params.has_callback);
452 function->set_user_gesture(params.user_gesture); 452 function->set_user_gesture(params.user_gesture);
453 function->set_extension(extension); 453 function->set_extension(extension);
454 function->set_profile_id(profile_id); 454 function->set_profile_id(profile_id);
455 function->set_response_callback(callback); 455 function->set_response_callback(callback);
456 function->set_source_tab_id(params.source_tab_id); 456 function->set_source_tab_id(params.source_tab_id);
457 function->set_source_context_type( 457 function->set_source_context_type(
458 process_map.GuessContextType(extension, requesting_process_id)); 458 process_map.GetMostLikelyContextType(extension, requesting_process_id));
459 459
460 return function; 460 return function;
461 } 461 }
462 462
463 // static 463 // static
464 void ExtensionFunctionDispatcher::SendAccessDenied( 464 void ExtensionFunctionDispatcher::SendAccessDenied(
465 const ExtensionFunction::ResponseCallback& callback) { 465 const ExtensionFunction::ResponseCallback& callback) {
466 base::ListValue empty_list; 466 base::ListValue empty_list;
467 callback.Run(ExtensionFunction::FAILED, empty_list, 467 callback.Run(ExtensionFunction::FAILED, empty_list,
468 "Access to extension API denied."); 468 "Access to extension API denied.");
469 } 469 }
470 470
471 } // namespace extensions 471 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/event_router.cc ('k') | extensions/browser/process_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698