OLD | NEW |
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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 IDR_MEDIA_GALLERY_CUSTOM_BINDINGS_JS); | 563 IDR_MEDIA_GALLERY_CUSTOM_BINDINGS_JS); |
564 source_map_.RegisterSource("experimental.offscreen", | 564 source_map_.RegisterSource("experimental.offscreen", |
565 IDR_EXPERIMENTAL_OFFSCREENTABS_CUSTOM_BINDINGS_JS); | 565 IDR_EXPERIMENTAL_OFFSCREENTABS_CUSTOM_BINDINGS_JS); |
566 source_map_.RegisterSource("experimental.usb", | 566 source_map_.RegisterSource("experimental.usb", |
567 IDR_EXPERIMENTAL_USB_CUSTOM_BINDINGS_JS); | 567 IDR_EXPERIMENTAL_USB_CUSTOM_BINDINGS_JS); |
568 source_map_.RegisterSource("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS); | 568 source_map_.RegisterSource("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS); |
569 source_map_.RegisterSource("fileBrowserHandler", | 569 source_map_.RegisterSource("fileBrowserHandler", |
570 IDR_FILE_BROWSER_HANDLER_CUSTOM_BINDINGS_JS); | 570 IDR_FILE_BROWSER_HANDLER_CUSTOM_BINDINGS_JS); |
571 source_map_.RegisterSource("fileBrowserPrivate", | 571 source_map_.RegisterSource("fileBrowserPrivate", |
572 IDR_FILE_BROWSER_PRIVATE_CUSTOM_BINDINGS_JS); | 572 IDR_FILE_BROWSER_PRIVATE_CUSTOM_BINDINGS_JS); |
| 573 source_map_.RegisterSource("fileSystem", |
| 574 IDR_FILE_SYSTEM_CUSTOM_BINDINGS_JS); |
573 source_map_.RegisterSource("i18n", IDR_I18N_CUSTOM_BINDINGS_JS); | 575 source_map_.RegisterSource("i18n", IDR_I18N_CUSTOM_BINDINGS_JS); |
574 source_map_.RegisterSource("experimental.input.ime", | 576 source_map_.RegisterSource("experimental.input.ime", |
575 IDR_INPUT_IME_CUSTOM_BINDINGS_JS); | 577 IDR_INPUT_IME_CUSTOM_BINDINGS_JS); |
576 source_map_.RegisterSource("omnibox", IDR_OMNIBOX_CUSTOM_BINDINGS_JS); | 578 source_map_.RegisterSource("omnibox", IDR_OMNIBOX_CUSTOM_BINDINGS_JS); |
577 source_map_.RegisterSource("pageActions", | 579 source_map_.RegisterSource("pageActions", |
578 IDR_PAGE_ACTIONS_CUSTOM_BINDINGS_JS); | 580 IDR_PAGE_ACTIONS_CUSTOM_BINDINGS_JS); |
579 source_map_.RegisterSource("pageAction", IDR_PAGE_ACTION_CUSTOM_BINDINGS_JS); | 581 source_map_.RegisterSource("pageAction", IDR_PAGE_ACTION_CUSTOM_BINDINGS_JS); |
580 source_map_.RegisterSource("pageCapture", | 582 source_map_.RegisterSource("pageCapture", |
581 IDR_PAGE_CAPTURE_CUSTOM_BINDINGS_JS); | 583 IDR_PAGE_CAPTURE_CUSTOM_BINDINGS_JS); |
582 source_map_.RegisterSource("platformApp", IDR_PLATFORM_APP_JS); | 584 source_map_.RegisterSource("platformApp", IDR_PLATFORM_APP_JS); |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 // APIs, they don't get extension bindings injected. If we end up here it | 961 // APIs, they don't get extension bindings injected. If we end up here it |
960 // means that a sandboxed page somehow managed to invoke an API anyway, so | 962 // means that a sandboxed page somehow managed to invoke an API anyway, so |
961 // we should abort. | 963 // we should abort. |
962 WebKit::WebFrame* frame = context->web_frame(); | 964 WebKit::WebFrame* frame = context->web_frame(); |
963 ExtensionURLInfo url_info(frame->document().securityOrigin(), | 965 ExtensionURLInfo url_info(frame->document().securityOrigin(), |
964 UserScriptSlave::GetDataSourceURLForFrame(frame)); | 966 UserScriptSlave::GetDataSourceURLForFrame(frame)); |
965 CHECK(!extensions_.IsSandboxedPage(url_info)); | 967 CHECK(!extensions_.IsSandboxedPage(url_info)); |
966 | 968 |
967 return true; | 969 return true; |
968 } | 970 } |
OLD | NEW |