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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 #include "gin/modules/module_registry.h" | 134 #include "gin/modules/module_registry.h" |
135 #include "media/audio/audio_output_device.h" | 135 #include "media/audio/audio_output_device.h" |
136 #include "media/base/audio_renderer_mixer_input.h" | 136 #include "media/base/audio_renderer_mixer_input.h" |
137 #include "media/base/media_log.h" | 137 #include "media/base/media_log.h" |
138 #include "media/base/media_switches.h" | 138 #include "media/base/media_switches.h" |
139 #include "media/blink/url_index.h" | 139 #include "media/blink/url_index.h" |
140 #include "media/blink/webencryptedmediaclient_impl.h" | 140 #include "media/blink/webencryptedmediaclient_impl.h" |
141 #include "media/blink/webmediaplayer_impl.h" | 141 #include "media/blink/webmediaplayer_impl.h" |
142 #include "media/renderers/gpu_video_accelerator_factories.h" | 142 #include "media/renderers/gpu_video_accelerator_factories.h" |
143 #include "mojo/common/url_type_converters.h" | 143 #include "mojo/common/url_type_converters.h" |
| 144 #include "mojo/edk/js/core.h" |
| 145 #include "mojo/edk/js/support.h" |
144 #include "net/base/data_url.h" | 146 #include "net/base/data_url.h" |
145 #include "net/base/net_errors.h" | 147 #include "net/base/net_errors.h" |
146 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 148 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
147 #include "net/http/http_util.h" | 149 #include "net/http/http_util.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/WebStorageQuotaCallbacks.h" | 151 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" |
150 #include "third_party/WebKit/public/platform/WebString.h" | 152 #include "third_party/WebKit/public/platform/WebString.h" |
151 #include "third_party/WebKit/public/platform/WebURL.h" | 153 #include "third_party/WebKit/public/platform/WebURL.h" |
152 #include "third_party/WebKit/public/platform/WebURLError.h" | 154 #include "third_party/WebKit/public/platform/WebURLError.h" |
153 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 155 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
(...skipping 13 matching lines...) Expand all Loading... |
167 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 169 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
168 #include "third_party/WebKit/public/web/WebScriptSource.h" | 170 #include "third_party/WebKit/public/web/WebScriptSource.h" |
169 #include "third_party/WebKit/public/web/WebSearchableFormData.h" | 171 #include "third_party/WebKit/public/web/WebSearchableFormData.h" |
170 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 172 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
171 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 173 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
172 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" | 174 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" |
173 #include "third_party/WebKit/public/web/WebSettings.h" | 175 #include "third_party/WebKit/public/web/WebSettings.h" |
174 #include "third_party/WebKit/public/web/WebSurroundingText.h" | 176 #include "third_party/WebKit/public/web/WebSurroundingText.h" |
175 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 177 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
176 #include "third_party/WebKit/public/web/WebView.h" | 178 #include "third_party/WebKit/public/web/WebView.h" |
177 #include "third_party/mojo/src/mojo/edk/js/core.h" | |
178 #include "third_party/mojo/src/mojo/edk/js/support.h" | |
179 #include "url/url_util.h" | 179 #include "url/url_util.h" |
180 | 180 |
181 #if defined(ENABLE_PLUGINS) | 181 #if defined(ENABLE_PLUGINS) |
182 #include "content/renderer/npapi/webplugin_impl.h" | 182 #include "content/renderer/npapi/webplugin_impl.h" |
183 #include "content/renderer/pepper/pepper_browser_connection.h" | 183 #include "content/renderer/pepper/pepper_browser_connection.h" |
184 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 184 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
185 #include "content/renderer/pepper/pepper_webplugin_impl.h" | 185 #include "content/renderer/pepper/pepper_webplugin_impl.h" |
186 #include "content/renderer/pepper/plugin_module.h" | 186 #include "content/renderer/pepper/plugin_module.h" |
187 #endif | 187 #endif |
188 | 188 |
(...skipping 2101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2290 Send(new ViewHostMsg_SelectionChanged(GetRenderWidget()->routing_id(), | 2290 Send(new ViewHostMsg_SelectionChanged(GetRenderWidget()->routing_id(), |
2291 selection_text, | 2291 selection_text, |
2292 offset, | 2292 offset, |
2293 range)); | 2293 range)); |
2294 } | 2294 } |
2295 | 2295 |
2296 void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable( | 2296 void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable( |
2297 v8::Isolate* isolate, | 2297 v8::Isolate* isolate, |
2298 v8::Local<v8::Context> context) { | 2298 v8::Local<v8::Context> context) { |
2299 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(context); | 2299 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(context); |
2300 if (registry->available_modules().count(mojo::js::Core::kModuleName)) | 2300 if (registry->available_modules().count(mojo::edk::Core::kModuleName)) |
2301 return; | 2301 return; |
2302 | 2302 |
2303 v8::HandleScope handle_scope(isolate); | 2303 v8::HandleScope handle_scope(isolate); |
2304 registry->AddBuiltinModule( | 2304 registry->AddBuiltinModule( |
2305 isolate, mojo::js::Core::kModuleName, mojo::js::Core::GetModule(isolate)); | 2305 isolate, mojo::edk::Core::kModuleName, |
| 2306 mojo::edk::Core::GetModule(isolate)); |
2306 registry->AddBuiltinModule(isolate, | 2307 registry->AddBuiltinModule(isolate, |
2307 mojo::js::Support::kModuleName, | 2308 mojo::edk::Support::kModuleName, |
2308 mojo::js::Support::GetModule(isolate)); | 2309 mojo::edk::Support::GetModule(isolate)); |
2309 registry->AddBuiltinModule( | 2310 registry->AddBuiltinModule( |
2310 isolate, | 2311 isolate, |
2311 ServiceRegistryJsWrapper::kModuleName, | 2312 ServiceRegistryJsWrapper::kModuleName, |
2312 ServiceRegistryJsWrapper::Create(isolate, &service_registry_).ToV8()); | 2313 ServiceRegistryJsWrapper::Create(isolate, &service_registry_).ToV8()); |
2313 } | 2314 } |
2314 | 2315 |
2315 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, | 2316 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, |
2316 const std::string& message) { | 2317 const std::string& message) { |
2317 if (devtools_agent_) | 2318 if (devtools_agent_) |
2318 devtools_agent_->AddMessageToConsole(level, message); | 2319 devtools_agent_->AddMessageToConsole(level, message); |
(...skipping 3448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5767 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 5768 media::ConvertToSwitchOutputDeviceCB(web_callbacks); |
5768 scoped_refptr<media::AudioOutputDevice> device = | 5769 scoped_refptr<media::AudioOutputDevice> device = |
5769 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 5770 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), |
5770 security_origin); | 5771 security_origin); |
5771 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 5772 media::OutputDeviceStatus status = device->GetDeviceStatus(); |
5772 device->Stop(); | 5773 device->Stop(); |
5773 callback.Run(status); | 5774 callback.Run(status); |
5774 } | 5775 } |
5775 | 5776 |
5776 } // namespace content | 5777 } // namespace content |
OLD | NEW |