| 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 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1936 media::FilterCollection* collection = new media::FilterCollection(); | 1937 media::FilterCollection* collection = new media::FilterCollection(); |
| 1937 RenderMediaLog* render_media_log = new RenderMediaLog(); | 1938 RenderMediaLog* render_media_log = new RenderMediaLog(); |
| 1938 | 1939 |
| 1939 // Add in any custom filter factories first. | 1940 // Add in any custom filter factories first. |
| 1940 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 1941 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 1941 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { | 1942 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { |
| 1942 // Add the chrome specific audio renderer. | 1943 // Add the chrome specific audio renderer. |
| 1943 collection->AddAudioRenderer(new AudioRendererImpl()); | 1944 collection->AddAudioRenderer(new AudioRendererImpl()); |
| 1944 } | 1945 } |
| 1945 | 1946 |
| 1947 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
| 1948 // Currently only cros/arm has any HW video decode support in |
| 1949 // GpuVideoDecodeAccelerator so we don't even try to use it on other |
| 1950 // platforms. This is a startup-time optimization. When new VDA |
| 1951 // implementations are added, relax the #if above. |
| 1952 WebKit::WebGraphicsContext3D* wk_context3d = webview()->graphicsContext3D(); |
| 1953 if (wk_context3d) { |
| 1954 WebGraphicsContext3DCommandBufferImpl* context3d = |
| 1955 static_cast<WebGraphicsContext3DCommandBufferImpl*>(wk_context3d); |
| 1956 GpuChannelHost* gpu_channel_host = |
| 1957 RenderThreadImpl::current()->EstablishGpuChannelSync( |
| 1958 content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 1959 collection->AddVideoDecoder(new media::GpuVideoDecoder( |
| 1960 MessageLoop::current(), |
| 1961 new RendererGpuVideoDecoderFactories( |
| 1962 gpu_channel_host, context3d->context()->AsWeakPtr()))); |
| 1963 } |
| 1964 #endif |
| 1965 |
| 1946 webkit_media::WebMediaPlayerImpl* result_ptr; | 1966 webkit_media::WebMediaPlayerImpl* result_ptr; |
| 1947 if (!content::GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( | 1967 if (!content::GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( |
| 1948 this, client, AsWeakPtr(), collection, message_loop_factory, | 1968 this, client, AsWeakPtr(), collection, message_loop_factory, |
| 1949 media_stream_impl_.get(), render_media_log, &result_ptr)) { | 1969 media_stream_impl_.get(), render_media_log, &result_ptr)) { |
| 1950 result_ptr = new webkit_media::WebMediaPlayerImpl( | 1970 result_ptr = new webkit_media::WebMediaPlayerImpl( |
| 1951 client, AsWeakPtr(), collection, message_loop_factory, | 1971 client, AsWeakPtr(), collection, message_loop_factory, |
| 1952 media_stream_impl_.get(), render_media_log); | 1972 media_stream_impl_.get(), render_media_log); |
| 1953 } | 1973 } |
| 1954 | 1974 |
| 1955 DCHECK(result_ptr); | 1975 DCHECK(result_ptr); |
| (...skipping 2827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4783 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 4803 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 4784 return !!RenderThreadImpl::current()->compositor_thread(); | 4804 return !!RenderThreadImpl::current()->compositor_thread(); |
| 4785 } | 4805 } |
| 4786 | 4806 |
| 4787 void RenderViewImpl::OnJavaBridgeInit() { | 4807 void RenderViewImpl::OnJavaBridgeInit() { |
| 4788 DCHECK(!java_bridge_dispatcher_.get()); | 4808 DCHECK(!java_bridge_dispatcher_.get()); |
| 4789 #if defined(ENABLE_JAVA_BRIDGE) | 4809 #if defined(ENABLE_JAVA_BRIDGE) |
| 4790 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 4810 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
| 4791 #endif | 4811 #endif |
| 4792 } | 4812 } |
| OLD | NEW |