| 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/WebData.h" | 149 #include "third_party/WebKit/public/platform/WebData.h" |
| 148 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" | 150 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" |
| 149 #include "third_party/WebKit/public/platform/WebString.h" | 151 #include "third_party/WebKit/public/platform/WebString.h" |
| 150 #include "third_party/WebKit/public/platform/WebURL.h" | 152 #include "third_party/WebKit/public/platform/WebURL.h" |
| 151 #include "third_party/WebKit/public/platform/WebURLError.h" | 153 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 152 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 154 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 166 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 168 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
| 167 #include "third_party/WebKit/public/web/WebScriptSource.h" | 169 #include "third_party/WebKit/public/web/WebScriptSource.h" |
| 168 #include "third_party/WebKit/public/web/WebSearchableFormData.h" | 170 #include "third_party/WebKit/public/web/WebSearchableFormData.h" |
| 169 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 171 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
| 170 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 172 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
| 171 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" | 173 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" |
| 172 #include "third_party/WebKit/public/web/WebSettings.h" | 174 #include "third_party/WebKit/public/web/WebSettings.h" |
| 173 #include "third_party/WebKit/public/web/WebSurroundingText.h" | 175 #include "third_party/WebKit/public/web/WebSurroundingText.h" |
| 174 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 176 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
| 175 #include "third_party/WebKit/public/web/WebView.h" | 177 #include "third_party/WebKit/public/web/WebView.h" |
| 176 #include "third_party/mojo/src/mojo/edk/js/core.h" | |
| 177 #include "third_party/mojo/src/mojo/edk/js/support.h" | |
| 178 #include "url/url_util.h" | 178 #include "url/url_util.h" |
| 179 | 179 |
| 180 #if defined(ENABLE_PLUGINS) | 180 #if defined(ENABLE_PLUGINS) |
| 181 #include "content/renderer/npapi/webplugin_impl.h" | 181 #include "content/renderer/npapi/webplugin_impl.h" |
| 182 #include "content/renderer/pepper/pepper_browser_connection.h" | 182 #include "content/renderer/pepper/pepper_browser_connection.h" |
| 183 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 183 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
| 184 #include "content/renderer/pepper/pepper_webplugin_impl.h" | 184 #include "content/renderer/pepper/pepper_webplugin_impl.h" |
| 185 #include "content/renderer/pepper/plugin_module.h" | 185 #include "content/renderer/pepper/plugin_module.h" |
| 186 #endif | 186 #endif |
| 187 | 187 |
| (...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2243 Send(new ViewHostMsg_SelectionChanged(GetRenderWidget()->routing_id(), | 2243 Send(new ViewHostMsg_SelectionChanged(GetRenderWidget()->routing_id(), |
| 2244 selection_text, | 2244 selection_text, |
| 2245 offset, | 2245 offset, |
| 2246 range)); | 2246 range)); |
| 2247 } | 2247 } |
| 2248 | 2248 |
| 2249 void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable( | 2249 void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable( |
| 2250 v8::Isolate* isolate, | 2250 v8::Isolate* isolate, |
| 2251 v8::Local<v8::Context> context) { | 2251 v8::Local<v8::Context> context) { |
| 2252 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(context); | 2252 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(context); |
| 2253 if (registry->available_modules().count(mojo::js::Core::kModuleName)) | 2253 if (registry->available_modules().count(mojo::edk::Core::kModuleName)) |
| 2254 return; | 2254 return; |
| 2255 | 2255 |
| 2256 v8::HandleScope handle_scope(isolate); | 2256 v8::HandleScope handle_scope(isolate); |
| 2257 registry->AddBuiltinModule( | 2257 registry->AddBuiltinModule( |
| 2258 isolate, mojo::js::Core::kModuleName, mojo::js::Core::GetModule(isolate)); | 2258 isolate, mojo::edk::Core::kModuleName, |
| 2259 mojo::edk::Core::GetModule(isolate)); |
| 2259 registry->AddBuiltinModule(isolate, | 2260 registry->AddBuiltinModule(isolate, |
| 2260 mojo::js::Support::kModuleName, | 2261 mojo::edk::Support::kModuleName, |
| 2261 mojo::js::Support::GetModule(isolate)); | 2262 mojo::edk::Support::GetModule(isolate)); |
| 2262 registry->AddBuiltinModule( | 2263 registry->AddBuiltinModule( |
| 2263 isolate, | 2264 isolate, |
| 2264 ServiceRegistryJsWrapper::kModuleName, | 2265 ServiceRegistryJsWrapper::kModuleName, |
| 2265 ServiceRegistryJsWrapper::Create(isolate, &service_registry_).ToV8()); | 2266 ServiceRegistryJsWrapper::Create(isolate, &service_registry_).ToV8()); |
| 2266 } | 2267 } |
| 2267 | 2268 |
| 2268 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, | 2269 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, |
| 2269 const std::string& message) { | 2270 const std::string& message) { |
| 2270 if (devtools_agent_) | 2271 if (devtools_agent_) |
| 2271 devtools_agent_->AddMessageToConsole(level, message); | 2272 devtools_agent_->AddMessageToConsole(level, message); |
| (...skipping 3417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5689 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 5690 media::ConvertToSwitchOutputDeviceCB(web_callbacks); |
| 5690 scoped_refptr<media::AudioOutputDevice> device = | 5691 scoped_refptr<media::AudioOutputDevice> device = |
| 5691 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 5692 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), |
| 5692 security_origin); | 5693 security_origin); |
| 5693 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 5694 media::OutputDeviceStatus status = device->GetDeviceStatus(); |
| 5694 device->Stop(); | 5695 device->Stop(); |
| 5695 callback.Run(status); | 5696 callback.Run(status); |
| 5696 } | 5697 } |
| 5697 | 5698 |
| 5698 } // namespace content | 5699 } // namespace content |
| OLD | NEW |