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/debug/alias.h" | 9 #include "base/debug/alias.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "chrome/renderer/extensions/app_window_custom_bindings.h" | 30 #include "chrome/renderer/extensions/app_window_custom_bindings.h" |
31 #include "chrome/renderer/extensions/binding_generating_native_handler.h" | 31 #include "chrome/renderer/extensions/binding_generating_native_handler.h" |
32 #include "chrome/renderer/extensions/blob_native_handler.h" | 32 #include "chrome/renderer/extensions/blob_native_handler.h" |
33 #include "chrome/renderer/extensions/chrome_v8_context.h" | 33 #include "chrome/renderer/extensions/chrome_v8_context.h" |
34 #include "chrome/renderer/extensions/chrome_v8_extension.h" | 34 #include "chrome/renderer/extensions/chrome_v8_extension.h" |
35 #include "chrome/renderer/extensions/content_watcher.h" | 35 #include "chrome/renderer/extensions/content_watcher.h" |
36 #include "chrome/renderer/extensions/context_menus_custom_bindings.h" | 36 #include "chrome/renderer/extensions/context_menus_custom_bindings.h" |
37 #include "chrome/renderer/extensions/css_native_handler.h" | 37 #include "chrome/renderer/extensions/css_native_handler.h" |
38 #include "chrome/renderer/extensions/document_custom_bindings.h" | 38 #include "chrome/renderer/extensions/document_custom_bindings.h" |
39 #include "chrome/renderer/extensions/dom_activity_logger.h" | 39 #include "chrome/renderer/extensions/dom_activity_logger.h" |
| 40 #include "chrome/renderer/extensions/enterprise_certificates_natives.h" |
40 #include "chrome/renderer/extensions/event_bindings.h" | 41 #include "chrome/renderer/extensions/event_bindings.h" |
41 #include "chrome/renderer/extensions/extension_groups.h" | 42 #include "chrome/renderer/extensions/extension_groups.h" |
42 #include "chrome/renderer/extensions/extension_helper.h" | 43 #include "chrome/renderer/extensions/extension_helper.h" |
43 #include "chrome/renderer/extensions/file_browser_handler_custom_bindings.h" | 44 #include "chrome/renderer/extensions/file_browser_handler_custom_bindings.h" |
44 #include "chrome/renderer/extensions/file_browser_private_custom_bindings.h" | 45 #include "chrome/renderer/extensions/file_browser_private_custom_bindings.h" |
45 #include "chrome/renderer/extensions/file_system_natives.h" | 46 #include "chrome/renderer/extensions/file_system_natives.h" |
46 #include "chrome/renderer/extensions/i18n_custom_bindings.h" | 47 #include "chrome/renderer/extensions/i18n_custom_bindings.h" |
47 #include "chrome/renderer/extensions/id_generator_custom_bindings.h" | 48 #include "chrome/renderer/extensions/id_generator_custom_bindings.h" |
48 #include "chrome/renderer/extensions/logging_native_handler.h" | 49 #include "chrome/renderer/extensions/logging_native_handler.h" |
49 #include "chrome/renderer/extensions/media_galleries_custom_bindings.h" | 50 #include "chrome/renderer/extensions/media_galleries_custom_bindings.h" |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 module_system->RegisterNativeHandler("blob_natives", | 923 module_system->RegisterNativeHandler("blob_natives", |
923 scoped_ptr<NativeHandler>(new BlobNativeHandler(context))); | 924 scoped_ptr<NativeHandler>(new BlobNativeHandler(context))); |
924 module_system->RegisterNativeHandler("context_menus", | 925 module_system->RegisterNativeHandler("context_menus", |
925 scoped_ptr<NativeHandler>( | 926 scoped_ptr<NativeHandler>( |
926 new ContextMenusCustomBindings(this, context))); | 927 new ContextMenusCustomBindings(this, context))); |
927 module_system->RegisterNativeHandler( | 928 module_system->RegisterNativeHandler( |
928 "css_natives", scoped_ptr<NativeHandler>(new CssNativeHandler(context))); | 929 "css_natives", scoped_ptr<NativeHandler>(new CssNativeHandler(context))); |
929 module_system->RegisterNativeHandler("document_natives", | 930 module_system->RegisterNativeHandler("document_natives", |
930 scoped_ptr<NativeHandler>( | 931 scoped_ptr<NativeHandler>( |
931 new DocumentCustomBindings(this, context))); | 932 new DocumentCustomBindings(this, context))); |
| 933 module_system->RegisterNativeHandler("enterprise_certificates_natives", |
| 934 scoped_ptr<NativeHandler>(new EnterpriseCertificatesNatives(context))); |
932 module_system->RegisterNativeHandler("sync_file_system", | 935 module_system->RegisterNativeHandler("sync_file_system", |
933 scoped_ptr<NativeHandler>( | 936 scoped_ptr<NativeHandler>( |
934 new SyncFileSystemCustomBindings(this, context))); | 937 new SyncFileSystemCustomBindings(this, context))); |
935 module_system->RegisterNativeHandler("file_browser_handler", | 938 module_system->RegisterNativeHandler("file_browser_handler", |
936 scoped_ptr<NativeHandler>(new FileBrowserHandlerCustomBindings( | 939 scoped_ptr<NativeHandler>(new FileBrowserHandlerCustomBindings( |
937 this, context))); | 940 this, context))); |
938 module_system->RegisterNativeHandler("file_browser_private", | 941 module_system->RegisterNativeHandler("file_browser_private", |
939 scoped_ptr<NativeHandler>(new FileBrowserPrivateCustomBindings( | 942 scoped_ptr<NativeHandler>(new FileBrowserPrivateCustomBindings( |
940 this, context))); | 943 this, context))); |
941 module_system->RegisterNativeHandler("i18n", | 944 module_system->RegisterNativeHandler("i18n", |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 source_map_.RegisterSource("declarativeContent", | 1004 source_map_.RegisterSource("declarativeContent", |
1002 IDR_DECLARATIVE_CONTENT_CUSTOM_BINDINGS_JS); | 1005 IDR_DECLARATIVE_CONTENT_CUSTOM_BINDINGS_JS); |
1003 source_map_.RegisterSource("declarativeWebRequest", | 1006 source_map_.RegisterSource("declarativeWebRequest", |
1004 IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS); | 1007 IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS); |
1005 source_map_.RegisterSource("desktopCapture", | 1008 source_map_.RegisterSource("desktopCapture", |
1006 IDR_DESKTOP_CAPTURE_CUSTOM_BINDINGS_JS); | 1009 IDR_DESKTOP_CAPTURE_CUSTOM_BINDINGS_JS); |
1007 source_map_.RegisterSource("developerPrivate", | 1010 source_map_.RegisterSource("developerPrivate", |
1008 IDR_DEVELOPER_PRIVATE_CUSTOM_BINDINGS_JS); | 1011 IDR_DEVELOPER_PRIVATE_CUSTOM_BINDINGS_JS); |
1009 source_map_.RegisterSource("downloads", | 1012 source_map_.RegisterSource("downloads", |
1010 IDR_DOWNLOADS_CUSTOM_BINDINGS_JS); | 1013 IDR_DOWNLOADS_CUSTOM_BINDINGS_JS); |
| 1014 source_map_.RegisterSource("enterprise.certificates", |
| 1015 IDR_ENTERPRISE_CERTIFICATES_CUSTOM_BINDINGS_JS); |
1011 source_map_.RegisterSource("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS); | 1016 source_map_.RegisterSource("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS); |
1012 source_map_.RegisterSource("feedbackPrivate", | 1017 source_map_.RegisterSource("feedbackPrivate", |
1013 IDR_FEEDBACK_PRIVATE_CUSTOM_BINDINGS_JS); | 1018 IDR_FEEDBACK_PRIVATE_CUSTOM_BINDINGS_JS); |
1014 source_map_.RegisterSource("fileBrowserHandler", | 1019 source_map_.RegisterSource("fileBrowserHandler", |
1015 IDR_FILE_BROWSER_HANDLER_CUSTOM_BINDINGS_JS); | 1020 IDR_FILE_BROWSER_HANDLER_CUSTOM_BINDINGS_JS); |
1016 source_map_.RegisterSource("fileBrowserPrivate", | 1021 source_map_.RegisterSource("fileBrowserPrivate", |
1017 IDR_FILE_BROWSER_PRIVATE_CUSTOM_BINDINGS_JS); | 1022 IDR_FILE_BROWSER_PRIVATE_CUSTOM_BINDINGS_JS); |
1018 source_map_.RegisterSource("fileSystem", | 1023 source_map_.RegisterSource("fileSystem", |
1019 IDR_FILE_SYSTEM_CUSTOM_BINDINGS_JS); | 1024 IDR_FILE_SYSTEM_CUSTOM_BINDINGS_JS); |
1020 source_map_.RegisterSource("fileSystemProvider", | 1025 source_map_.RegisterSource("fileSystemProvider", |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1696 } | 1701 } |
1697 | 1702 |
1698 void Dispatcher::ClearPortData(int port_id) { | 1703 void Dispatcher::ClearPortData(int port_id) { |
1699 // Only the target port side has entries in |port_to_tab_id_map_|. If | 1704 // Only the target port side has entries in |port_to_tab_id_map_|. If |
1700 // |port_id| is a source port, std::map::erase() will just silently fail | 1705 // |port_id| is a source port, std::map::erase() will just silently fail |
1701 // here as a no-op. | 1706 // here as a no-op. |
1702 port_to_tab_id_map_.erase(port_id); | 1707 port_to_tab_id_map_.erase(port_id); |
1703 } | 1708 } |
1704 | 1709 |
1705 } // namespace extensions | 1710 } // namespace extensions |
OLD | NEW |