OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 #include "gin/modules/module_registry.h" | 133 #include "gin/modules/module_registry.h" |
134 #include "media/audio/audio_output_device.h" | 134 #include "media/audio/audio_output_device.h" |
135 #include "media/base/audio_renderer_mixer_input.h" | 135 #include "media/base/audio_renderer_mixer_input.h" |
136 #include "media/base/media_log.h" | 136 #include "media/base/media_log.h" |
137 #include "media/base/media_switches.h" | 137 #include "media/base/media_switches.h" |
138 #include "media/blink/url_index.h" | 138 #include "media/blink/url_index.h" |
139 #include "media/blink/webencryptedmediaclient_impl.h" | 139 #include "media/blink/webencryptedmediaclient_impl.h" |
140 #include "media/blink/webmediaplayer_impl.h" | 140 #include "media/blink/webmediaplayer_impl.h" |
141 #include "media/renderers/gpu_video_accelerator_factories.h" | 141 #include "media/renderers/gpu_video_accelerator_factories.h" |
142 #include "mojo/common/url_type_converters.h" | 142 #include "mojo/common/url_type_converters.h" |
| 143 #include "mojo/edk/js/core.h" |
| 144 #include "mojo/edk/js/support.h" |
143 #include "net/base/data_url.h" | 145 #include "net/base/data_url.h" |
144 #include "net/base/net_errors.h" | 146 #include "net/base/net_errors.h" |
145 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 147 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
146 #include "net/http/http_util.h" | 148 #include "net/http/http_util.h" |
147 #include "third_party/WebKit/public/platform/URLConversion.h" | 149 #include "third_party/WebKit/public/platform/URLConversion.h" |
148 #include "third_party/WebKit/public/platform/WebData.h" | 150 #include "third_party/WebKit/public/platform/WebData.h" |
149 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 151 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
150 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 152 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
151 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" | 153 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" |
152 #include "third_party/WebKit/public/platform/WebString.h" | 154 #include "third_party/WebKit/public/platform/WebString.h" |
(...skipping 18 matching lines...) Expand all Loading... |
171 #include "third_party/WebKit/public/web/WebRange.h" | 173 #include "third_party/WebKit/public/web/WebRange.h" |
172 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 174 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
173 #include "third_party/WebKit/public/web/WebScriptSource.h" | 175 #include "third_party/WebKit/public/web/WebScriptSource.h" |
174 #include "third_party/WebKit/public/web/WebSearchableFormData.h" | 176 #include "third_party/WebKit/public/web/WebSearchableFormData.h" |
175 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 177 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
176 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" | 178 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" |
177 #include "third_party/WebKit/public/web/WebSettings.h" | 179 #include "third_party/WebKit/public/web/WebSettings.h" |
178 #include "third_party/WebKit/public/web/WebSurroundingText.h" | 180 #include "third_party/WebKit/public/web/WebSurroundingText.h" |
179 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 181 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
180 #include "third_party/WebKit/public/web/WebView.h" | 182 #include "third_party/WebKit/public/web/WebView.h" |
181 #include "third_party/mojo/src/mojo/edk/js/core.h" | |
182 #include "third_party/mojo/src/mojo/edk/js/support.h" | |
183 #include "url/url_util.h" | 183 #include "url/url_util.h" |
184 | 184 |
185 #if defined(ENABLE_PLUGINS) | 185 #if defined(ENABLE_PLUGINS) |
186 #include "content/renderer/npapi/webplugin_impl.h" | 186 #include "content/renderer/npapi/webplugin_impl.h" |
187 #include "content/renderer/pepper/pepper_browser_connection.h" | 187 #include "content/renderer/pepper/pepper_browser_connection.h" |
188 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 188 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
189 #include "content/renderer/pepper/pepper_webplugin_impl.h" | 189 #include "content/renderer/pepper/pepper_webplugin_impl.h" |
190 #include "content/renderer/pepper/plugin_module.h" | 190 #include "content/renderer/pepper/plugin_module.h" |
191 #endif | 191 #endif |
192 | 192 |
(...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2374 Send(new ViewHostMsg_SelectionChanged(GetRenderWidget()->routing_id(), | 2374 Send(new ViewHostMsg_SelectionChanged(GetRenderWidget()->routing_id(), |
2375 selection_text, | 2375 selection_text, |
2376 static_cast<uint32_t>(offset), | 2376 static_cast<uint32_t>(offset), |
2377 range)); | 2377 range)); |
2378 } | 2378 } |
2379 | 2379 |
2380 void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable( | 2380 void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable( |
2381 v8::Isolate* isolate, | 2381 v8::Isolate* isolate, |
2382 v8::Local<v8::Context> context) { | 2382 v8::Local<v8::Context> context) { |
2383 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(context); | 2383 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(context); |
2384 if (registry->available_modules().count(mojo::js::Core::kModuleName)) | 2384 if (registry->available_modules().count(mojo::edk::js::Core::kModuleName)) |
2385 return; | 2385 return; |
2386 | 2386 |
2387 v8::HandleScope handle_scope(isolate); | 2387 v8::HandleScope handle_scope(isolate); |
2388 registry->AddBuiltinModule( | 2388 registry->AddBuiltinModule(isolate, mojo::edk::js::Core::kModuleName, |
2389 isolate, mojo::js::Core::kModuleName, mojo::js::Core::GetModule(isolate)); | 2389 mojo::edk::js::Core::GetModule(isolate)); |
2390 registry->AddBuiltinModule(isolate, | 2390 registry->AddBuiltinModule(isolate, mojo::edk::js::Support::kModuleName, |
2391 mojo::js::Support::kModuleName, | 2391 mojo::edk::js::Support::GetModule(isolate)); |
2392 mojo::js::Support::GetModule(isolate)); | |
2393 registry->AddBuiltinModule( | 2392 registry->AddBuiltinModule( |
2394 isolate, | 2393 isolate, |
2395 ServiceRegistryJsWrapper::kModuleName, | 2394 ServiceRegistryJsWrapper::kModuleName, |
2396 ServiceRegistryJsWrapper::Create(isolate, &service_registry_).ToV8()); | 2395 ServiceRegistryJsWrapper::Create(isolate, &service_registry_).ToV8()); |
2397 } | 2396 } |
2398 | 2397 |
2399 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, | 2398 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, |
2400 const std::string& message) { | 2399 const std::string& message) { |
2401 if (devtools_agent_) | 2400 if (devtools_agent_) |
2402 devtools_agent_->AddMessageToConsole(level, message); | 2401 devtools_agent_->AddMessageToConsole(level, message); |
(...skipping 3731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6134 int match_count, | 6133 int match_count, |
6135 int ordinal, | 6134 int ordinal, |
6136 const WebRect& selection_rect, | 6135 const WebRect& selection_rect, |
6137 bool final_status_update) { | 6136 bool final_status_update) { |
6138 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6137 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6139 selection_rect, ordinal, | 6138 selection_rect, ordinal, |
6140 final_status_update)); | 6139 final_status_update)); |
6141 } | 6140 } |
6142 | 6141 |
6143 } // namespace content | 6142 } // namespace content |
OLD | NEW |