| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 #include "content/renderer/media/media_stream_impl.h" | 62 #include "content/renderer/media/media_stream_impl.h" |
| 63 #include "content/renderer/media/render_media_log.h" | 63 #include "content/renderer/media/render_media_log.h" |
| 64 #include "content/renderer/mhtml_generator.h" | 64 #include "content/renderer/mhtml_generator.h" |
| 65 #include "content/renderer/notification_provider.h" | 65 #include "content/renderer/notification_provider.h" |
| 66 #include "content/renderer/p2p/socket_dispatcher.h" | 66 #include "content/renderer/p2p/socket_dispatcher.h" |
| 67 #include "content/renderer/plugin_channel_host.h" | 67 #include "content/renderer/plugin_channel_host.h" |
| 68 #include "content/renderer/render_process.h" | 68 #include "content/renderer/render_process.h" |
| 69 #include "content/renderer/render_thread_impl.h" | 69 #include "content/renderer/render_thread_impl.h" |
| 70 #include "content/renderer/render_widget_fullscreen_pepper.h" | 70 #include "content/renderer/render_widget_fullscreen_pepper.h" |
| 71 #include "content/renderer/renderer_accessibility.h" | 71 #include "content/renderer/renderer_accessibility.h" |
| 72 #include "content/renderer/renderer_gpu_video_decoder_factories.h" |
| 72 #include "content/renderer/renderer_webapplicationcachehost_impl.h" | 73 #include "content/renderer/renderer_webapplicationcachehost_impl.h" |
| 73 #include "content/renderer/renderer_webstoragenamespace_impl.h" | 74 #include "content/renderer/renderer_webstoragenamespace_impl.h" |
| 74 #include "content/renderer/speech_input_dispatcher.h" | 75 #include "content/renderer/speech_input_dispatcher.h" |
| 75 #include "content/renderer/text_input_client_observer.h" | 76 #include "content/renderer/text_input_client_observer.h" |
| 76 #include "content/renderer/v8_value_converter_impl.h" | 77 #include "content/renderer/v8_value_converter_impl.h" |
| 77 #include "content/renderer/web_ui_bindings.h" | 78 #include "content/renderer/web_ui_bindings.h" |
| 78 #include "content/renderer/webplugin_delegate_proxy.h" | 79 #include "content/renderer/webplugin_delegate_proxy.h" |
| 79 #include "content/renderer/websharedworker_proxy.h" | 80 #include "content/renderer/websharedworker_proxy.h" |
| 80 #include "media/base/filter_collection.h" | 81 #include "media/base/filter_collection.h" |
| 81 #include "media/base/media_switches.h" | 82 #include "media/base/media_switches.h" |
| 82 #include "media/base/message_loop_factory_impl.h" | 83 #include "media/base/message_loop_factory_impl.h" |
| 84 #include "media/filters/gpu_video_decoder.h" |
| 83 #include "net/base/escape.h" | 85 #include "net/base/escape.h" |
| 84 #include "net/base/net_errors.h" | 86 #include "net/base/net_errors.h" |
| 85 #include "net/http/http_util.h" | 87 #include "net/http/http_util.h" |
| 86 #include "ppapi/c/private/ppb_flash_net_connector.h" | 88 #include "ppapi/c/private/ppb_flash_net_connector.h" |
| 87 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" | 89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" |
| 88 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" | 90 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" |
| 89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" | 91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" |
| 90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 91 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.
h" | 93 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.
h" |
| 92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 #include "webkit/glue/context_menu.h" | 142 #include "webkit/glue/context_menu.h" |
| 141 #include "webkit/glue/dom_operations.h" | 143 #include "webkit/glue/dom_operations.h" |
| 142 #include "webkit/glue/form_data.h" | 144 #include "webkit/glue/form_data.h" |
| 143 #include "webkit/glue/form_field.h" | 145 #include "webkit/glue/form_field.h" |
| 144 #include "webkit/glue/glue_serialize.h" | 146 #include "webkit/glue/glue_serialize.h" |
| 145 #include "webkit/glue/password_form_dom_manager.h" | 147 #include "webkit/glue/password_form_dom_manager.h" |
| 146 #include "webkit/glue/webdropdata.h" | 148 #include "webkit/glue/webdropdata.h" |
| 147 #include "webkit/glue/webkit_constants.h" | 149 #include "webkit/glue/webkit_constants.h" |
| 148 #include "webkit/glue/webkit_glue.h" | 150 #include "webkit/glue/webkit_glue.h" |
| 149 #include "webkit/glue/weburlloader_impl.h" | 151 #include "webkit/glue/weburlloader_impl.h" |
| 150 #include "webkit/media/video_renderer_impl.h" | |
| 151 #include "webkit/media/webmediaplayer_impl.h" | 152 #include "webkit/media/webmediaplayer_impl.h" |
| 152 #include "webkit/plugins/npapi/plugin_list.h" | 153 #include "webkit/plugins/npapi/plugin_list.h" |
| 153 #include "webkit/plugins/npapi/webplugin_delegate.h" | 154 #include "webkit/plugins/npapi/webplugin_delegate.h" |
| 154 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 155 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
| 155 #include "webkit/plugins/npapi/webplugin_impl.h" | 156 #include "webkit/plugins/npapi/webplugin_impl.h" |
| 156 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" | 157 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" |
| 157 | 158 |
| 158 #if defined(OS_WIN) | 159 #if defined(OS_WIN) |
| 159 // TODO(port): these files are currently Windows only because they concern: | 160 // TODO(port): these files are currently Windows only because they concern: |
| 160 // * theming | 161 // * theming |
| (...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1937 scoped_ptr<media::FilterCollection> collection( | 1938 scoped_ptr<media::FilterCollection> collection( |
| 1938 new media::FilterCollection()); | 1939 new media::FilterCollection()); |
| 1939 | 1940 |
| 1940 // Add in any custom filter factories first. | 1941 // Add in any custom filter factories first. |
| 1941 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 1942 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 1942 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { | 1943 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { |
| 1943 // Add the chrome specific audio renderer. | 1944 // Add the chrome specific audio renderer. |
| 1944 collection->AddAudioRenderer(new AudioRendererImpl()); | 1945 collection->AddAudioRenderer(new AudioRendererImpl()); |
| 1945 } | 1946 } |
| 1946 | 1947 |
| 1948 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
| 1949 // Currently only cros/arm has any HW video decode support in |
| 1950 // GpuVideoDecodeAccelerator so we don't even try to use it on other |
| 1951 // platforms. This is a startup-time optimization. When new VDA |
| 1952 // implementations are added, relax the #if above. |
| 1953 WebKit::WebGraphicsContext3D* wk_context3d = webview()->graphicsContext3D(); |
| 1954 if (wk_context3d) { |
| 1955 WebGraphicsContext3DCommandBufferImpl* context3d = |
| 1956 static_cast<WebGraphicsContext3DCommandBufferImpl*>(wk_context3d); |
| 1957 GpuChannelHost* gpu_channel_host = |
| 1958 RenderThreadImpl::current()->EstablishGpuChannelSync( |
| 1959 content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 1960 collection->AddVideoDecoder(new media::GpuVideoDecoder( |
| 1961 MessageLoop::current(), |
| 1962 new RendererGpuVideoDecoderFactories( |
| 1963 gpu_channel_host, context3d->context()->AsWeakPtr()))); |
| 1964 } |
| 1965 #endif |
| 1966 |
| 1947 scoped_ptr<webkit_media::WebMediaPlayerImpl> result( | 1967 scoped_ptr<webkit_media::WebMediaPlayerImpl> result( |
| 1948 new webkit_media::WebMediaPlayerImpl(client, | 1968 new webkit_media::WebMediaPlayerImpl(client, |
| 1949 AsWeakPtr(), | 1969 AsWeakPtr(), |
| 1950 collection.release(), | 1970 collection.release(), |
| 1951 message_loop_factory.release(), | 1971 message_loop_factory.release(), |
| 1952 media_stream_impl_.get(), | 1972 media_stream_impl_.get(), |
| 1953 new RenderMediaLog())); | 1973 new RenderMediaLog())); |
| 1954 if (!result->Initialize(frame, | 1974 if (!result->Initialize(frame, |
| 1955 cmd_line->HasSwitch(switches::kSimpleDataSource))) { | 1975 cmd_line->HasSwitch(switches::kSimpleDataSource))) { |
| 1956 return NULL; | 1976 return NULL; |
| (...skipping 2831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4788 return !!RenderThreadImpl::current()->compositor_thread(); | 4808 return !!RenderThreadImpl::current()->compositor_thread(); |
| 4789 } | 4809 } |
| 4790 | 4810 |
| 4791 void RenderViewImpl::OnJavaBridgeInit( | 4811 void RenderViewImpl::OnJavaBridgeInit( |
| 4792 const IPC::ChannelHandle& channel_handle) { | 4812 const IPC::ChannelHandle& channel_handle) { |
| 4793 DCHECK(!java_bridge_dispatcher_.get()); | 4813 DCHECK(!java_bridge_dispatcher_.get()); |
| 4794 #if defined(ENABLE_JAVA_BRIDGE) | 4814 #if defined(ENABLE_JAVA_BRIDGE) |
| 4795 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); | 4815 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); |
| 4796 #endif | 4816 #endif |
| 4797 } | 4817 } |
| OLD | NEW |