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/dispatcher.h" | 5 #include "chrome/renderer/extensions/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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
586 scoped_ptr<NativeHandler>(new AppWindowCustomBindings(this))); | 586 scoped_ptr<NativeHandler>(new AppWindowCustomBindings(this))); |
587 module_system->RegisterNativeHandler("context_menus", | 587 module_system->RegisterNativeHandler("context_menus", |
588 scoped_ptr<NativeHandler>(new ContextMenusCustomBindings())); | 588 scoped_ptr<NativeHandler>(new ContextMenusCustomBindings())); |
589 module_system->RegisterNativeHandler("extension", | 589 module_system->RegisterNativeHandler("extension", |
590 scoped_ptr<NativeHandler>( | 590 scoped_ptr<NativeHandler>( |
591 new ExtensionCustomBindings(this))); | 591 new ExtensionCustomBindings(this))); |
592 module_system->RegisterNativeHandler("experimental_app", | 592 module_system->RegisterNativeHandler("experimental_app", |
593 scoped_ptr<NativeHandler>(new ExperimentalAppCustomBindings())); | 593 scoped_ptr<NativeHandler>(new ExperimentalAppCustomBindings())); |
594 module_system->RegisterNativeHandler("experimental_mediaGalleries", | 594 module_system->RegisterNativeHandler("experimental_mediaGalleries", |
595 scoped_ptr<NativeHandler>(new MediaGalleryCustomBindings())); | 595 scoped_ptr<NativeHandler>(new MediaGalleryCustomBindings())); |
596 #if !defined(OS_ANDROID) | |
597 // USB binding code is not built on Android. | |
596 module_system->RegisterNativeHandler("experimental_usb", | 598 module_system->RegisterNativeHandler("experimental_usb", |
597 scoped_ptr<NativeHandler>(new ExperimentalUsbCustomBindings())); | 599 scoped_ptr<NativeHandler>(new ExperimentalUsbCustomBindings())); |
600 #endif | |
asargent_no_longer_on_chrome
2012/08/08 18:44:21
This seems like kind of a strange place to do this
| |
598 module_system->RegisterNativeHandler("file_browser_handler", | 601 module_system->RegisterNativeHandler("file_browser_handler", |
599 scoped_ptr<NativeHandler>(new FileBrowserHandlerCustomBindings())); | 602 scoped_ptr<NativeHandler>(new FileBrowserHandlerCustomBindings())); |
600 module_system->RegisterNativeHandler("file_browser_private", | 603 module_system->RegisterNativeHandler("file_browser_private", |
601 scoped_ptr<NativeHandler>(new FileBrowserPrivateCustomBindings())); | 604 scoped_ptr<NativeHandler>(new FileBrowserPrivateCustomBindings())); |
602 module_system->RegisterNativeHandler("i18n", | 605 module_system->RegisterNativeHandler("i18n", |
603 scoped_ptr<NativeHandler>(new I18NCustomBindings())); | 606 scoped_ptr<NativeHandler>(new I18NCustomBindings())); |
604 module_system->RegisterNativeHandler("page_actions", | 607 module_system->RegisterNativeHandler("page_actions", |
605 scoped_ptr<NativeHandler>( | 608 scoped_ptr<NativeHandler>( |
606 new PageActionsCustomBindings(this))); | 609 new PageActionsCustomBindings(this))); |
607 module_system->RegisterNativeHandler("page_capture", | 610 module_system->RegisterNativeHandler("page_capture", |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1128 // we should abort. | 1131 // we should abort. |
1129 WebKit::WebFrame* frame = context->web_frame(); | 1132 WebKit::WebFrame* frame = context->web_frame(); |
1130 ExtensionURLInfo url_info(frame->document().securityOrigin(), | 1133 ExtensionURLInfo url_info(frame->document().securityOrigin(), |
1131 UserScriptSlave::GetDataSourceURLForFrame(frame)); | 1134 UserScriptSlave::GetDataSourceURLForFrame(frame)); |
1132 CHECK(!extensions_.IsSandboxedPage(url_info)); | 1135 CHECK(!extensions_.IsSandboxedPage(url_info)); |
1133 | 1136 |
1134 return true; | 1137 return true; |
1135 } | 1138 } |
1136 | 1139 |
1137 } // namespace extensions | 1140 } // namespace extensions |
OLD | NEW |