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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #include "chrome/renderer/extensions/safe_builtins.h" | 66 #include "chrome/renderer/extensions/safe_builtins.h" |
67 #include "chrome/renderer/extensions/send_request_natives.h" | 67 #include "chrome/renderer/extensions/send_request_natives.h" |
68 #include "chrome/renderer/extensions/set_icon_natives.h" | 68 #include "chrome/renderer/extensions/set_icon_natives.h" |
69 #include "chrome/renderer/extensions/sync_file_system_custom_bindings.h" | 69 #include "chrome/renderer/extensions/sync_file_system_custom_bindings.h" |
70 #include "chrome/renderer/extensions/tab_finder.h" | 70 #include "chrome/renderer/extensions/tab_finder.h" |
71 #include "chrome/renderer/extensions/tabs_custom_bindings.h" | 71 #include "chrome/renderer/extensions/tabs_custom_bindings.h" |
72 #include "chrome/renderer/extensions/tts_custom_bindings.h" | 72 #include "chrome/renderer/extensions/tts_custom_bindings.h" |
73 #include "chrome/renderer/extensions/user_script_slave.h" | 73 #include "chrome/renderer/extensions/user_script_slave.h" |
74 #include "chrome/renderer/extensions/web_request_custom_bindings.h" | 74 #include "chrome/renderer/extensions/web_request_custom_bindings.h" |
75 #include "chrome/renderer/extensions/webstore_bindings.h" | 75 #include "chrome/renderer/extensions/webstore_bindings.h" |
| 76 #include "chrome/renderer/extensions/webview_custom_bindings.h" |
76 #include "chrome/renderer/resource_bundle_source_map.h" | 77 #include "chrome/renderer/resource_bundle_source_map.h" |
77 #include "content/public/renderer/render_thread.h" | 78 #include "content/public/renderer/render_thread.h" |
78 #include "content/public/renderer/render_view.h" | 79 #include "content/public/renderer/render_view.h" |
79 #include "content/public/renderer/v8_value_converter.h" | 80 #include "content/public/renderer/v8_value_converter.h" |
80 #include "extensions/common/constants.h" | 81 #include "extensions/common/constants.h" |
81 #include "extensions/common/features/feature.h" | 82 #include "extensions/common/features/feature.h" |
82 #include "extensions/common/features/feature_provider.h" | 83 #include "extensions/common/features/feature_provider.h" |
83 #include "extensions/common/manifest.h" | 84 #include "extensions/common/manifest.h" |
84 #include "extensions/common/manifest_constants.h" | 85 #include "extensions/common/manifest_constants.h" |
85 #include "extensions/common/view_type.h" | 86 #include "extensions/common/view_type.h" |
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 scoped_ptr<NativeHandler>(new RuntimeCustomBindings(this, context))); | 893 scoped_ptr<NativeHandler>(new RuntimeCustomBindings(this, context))); |
893 module_system->RegisterNativeHandler("tabs", | 894 module_system->RegisterNativeHandler("tabs", |
894 scoped_ptr<NativeHandler>(new TabsCustomBindings(this, context))); | 895 scoped_ptr<NativeHandler>(new TabsCustomBindings(this, context))); |
895 module_system->RegisterNativeHandler("tts", | 896 module_system->RegisterNativeHandler("tts", |
896 scoped_ptr<NativeHandler>(new TTSCustomBindings(this, context))); | 897 scoped_ptr<NativeHandler>(new TTSCustomBindings(this, context))); |
897 module_system->RegisterNativeHandler("web_request", | 898 module_system->RegisterNativeHandler("web_request", |
898 scoped_ptr<NativeHandler>( | 899 scoped_ptr<NativeHandler>( |
899 new WebRequestCustomBindings(this, context))); | 900 new WebRequestCustomBindings(this, context))); |
900 module_system->RegisterNativeHandler("webstore", | 901 module_system->RegisterNativeHandler("webstore", |
901 scoped_ptr<NativeHandler>(new WebstoreBindings(this, context))); | 902 scoped_ptr<NativeHandler>(new WebstoreBindings(this, context))); |
| 903 module_system->RegisterNativeHandler("webview_natives", |
| 904 scoped_ptr<NativeHandler>(new WebViewCustomBindings(this, context))); |
902 } | 905 } |
903 | 906 |
904 void Dispatcher::PopulateSourceMap() { | 907 void Dispatcher::PopulateSourceMap() { |
905 // Libraries. | 908 // Libraries. |
906 source_map_.RegisterSource("contentWatcher", IDR_CONTENT_WATCHER_JS); | 909 source_map_.RegisterSource("contentWatcher", IDR_CONTENT_WATCHER_JS); |
907 source_map_.RegisterSource("entryIdManager", IDR_ENTRY_ID_MANAGER); | 910 source_map_.RegisterSource("entryIdManager", IDR_ENTRY_ID_MANAGER); |
908 source_map_.RegisterSource(kEventModule, IDR_EVENT_BINDINGS_JS); | 911 source_map_.RegisterSource(kEventModule, IDR_EVENT_BINDINGS_JS); |
909 source_map_.RegisterSource("imageUtil", IDR_IMAGE_UTIL_JS); | 912 source_map_.RegisterSource("imageUtil", IDR_IMAGE_UTIL_JS); |
910 source_map_.RegisterSource("json_schema", IDR_JSON_SCHEMA_JS); | 913 source_map_.RegisterSource("json_schema", IDR_JSON_SCHEMA_JS); |
911 source_map_.RegisterSource("lastError", IDR_LAST_ERROR_JS); | 914 source_map_.RegisterSource("lastError", IDR_LAST_ERROR_JS); |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1562 RenderView* background_view = | 1565 RenderView* background_view = |
1563 ExtensionHelper::GetBackgroundPage(extension_id); | 1566 ExtensionHelper::GetBackgroundPage(extension_id); |
1564 if (background_view) { | 1567 if (background_view) { |
1565 background_view->Send(new ExtensionHostMsg_EventAck( | 1568 background_view->Send(new ExtensionHostMsg_EventAck( |
1566 background_view->GetRoutingID())); | 1569 background_view->GetRoutingID())); |
1567 } | 1570 } |
1568 } | 1571 } |
1569 } | 1572 } |
1570 | 1573 |
1571 } // namespace extensions | 1574 } // namespace extensions |
OLD | NEW |