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

Side by Side Diff: chrome/renderer/extensions/extension_dispatcher.cc

Issue 10535030: Allow updateArgumentsPostValidate to support callbacks and added / removed arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit tests Created 8 years, 6 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/renderer/extensions/extension_dispatcher.h" 5 #include "chrome/renderer/extensions/extension_dispatcher.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 IDR_MISCELLANEOUS_BINDINGS_JS); 536 IDR_MISCELLANEOUS_BINDINGS_JS);
537 source_map_.RegisterSource("schema_generated_bindings", 537 source_map_.RegisterSource("schema_generated_bindings",
538 IDR_SCHEMA_GENERATED_BINDINGS_JS); 538 IDR_SCHEMA_GENERATED_BINDINGS_JS);
539 source_map_.RegisterSource("json_schema", IDR_JSON_SCHEMA_JS); 539 source_map_.RegisterSource("json_schema", IDR_JSON_SCHEMA_JS);
540 source_map_.RegisterSource("apitest", IDR_EXTENSION_APITEST_JS); 540 source_map_.RegisterSource("apitest", IDR_EXTENSION_APITEST_JS);
541 541
542 // Libraries. 542 // Libraries.
543 source_map_.RegisterSource("sendRequest", IDR_SEND_REQUEST_JS); 543 source_map_.RegisterSource("sendRequest", IDR_SEND_REQUEST_JS);
544 source_map_.RegisterSource("setIcon", IDR_SET_ICON_JS); 544 source_map_.RegisterSource("setIcon", IDR_SET_ICON_JS);
545 source_map_.RegisterSource("utils", IDR_UTILS_JS); 545 source_map_.RegisterSource("utils", IDR_UTILS_JS);
546 source_map_.RegisterSource("validateUtils", IDR_VALIDATE_UTILS_JS);
not at google - send to devlin 2012/06/07 00:17:11 Bikeshed moment: I'd have called it schemaUtil co
benwells 2012/06/07 01:45:40 Done (as schemaUtils).
546 547
547 // Custom bindings. 548 // Custom bindings.
548 source_map_.RegisterSource("app", IDR_APP_CUSTOM_BINDINGS_JS); 549 source_map_.RegisterSource("app", IDR_APP_CUSTOM_BINDINGS_JS);
549 source_map_.RegisterSource("appWindow", IDR_APP_WINDOW_CUSTOM_BINDINGS_JS); 550 source_map_.RegisterSource("appWindow", IDR_APP_WINDOW_CUSTOM_BINDINGS_JS);
550 source_map_.RegisterSource("browserAction", 551 source_map_.RegisterSource("browserAction",
551 IDR_BROWSER_ACTION_CUSTOM_BINDINGS_JS); 552 IDR_BROWSER_ACTION_CUSTOM_BINDINGS_JS);
552 source_map_.RegisterSource("contentSettings", 553 source_map_.RegisterSource("contentSettings",
553 IDR_CONTENT_SETTINGS_CUSTOM_BINDINGS_JS); 554 IDR_CONTENT_SETTINGS_CUSTOM_BINDINGS_JS);
554 source_map_.RegisterSource("contextMenus", 555 source_map_.RegisterSource("contextMenus",
555 IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS); 556 IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS);
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 // APIs, they don't get extension bindings injected. If we end up here it 959 // APIs, they don't get extension bindings injected. If we end up here it
959 // means that a sandboxed page somehow managed to invoke an API anyway, so 960 // means that a sandboxed page somehow managed to invoke an API anyway, so
960 // we should abort. 961 // we should abort.
961 WebKit::WebFrame* frame = context->web_frame(); 962 WebKit::WebFrame* frame = context->web_frame();
962 ExtensionURLInfo url_info(frame->document().securityOrigin(), 963 ExtensionURLInfo url_info(frame->document().securityOrigin(),
963 UserScriptSlave::GetDataSourceURLForFrame(frame)); 964 UserScriptSlave::GetDataSourceURLForFrame(frame));
964 CHECK(!extensions_.IsSandboxedPage(url_info)); 965 CHECK(!extensions_.IsSandboxedPage(url_info));
965 966
966 return true; 967 return true;
967 } 968 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698