| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 #include "webkit/glue/weburlresponse_extradata_impl.h" | 182 #include "webkit/glue/weburlresponse_extradata_impl.h" |
| 183 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 183 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
| 184 #include "webkit/media/webmediaplayer_impl.h" | 184 #include "webkit/media/webmediaplayer_impl.h" |
| 185 #include "webkit/plugins/npapi/plugin_list.h" | 185 #include "webkit/plugins/npapi/plugin_list.h" |
| 186 #include "webkit/plugins/npapi/webplugin_delegate.h" | 186 #include "webkit/plugins/npapi/webplugin_delegate.h" |
| 187 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 187 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
| 188 #include "webkit/plugins/npapi/webplugin_impl.h" | 188 #include "webkit/plugins/npapi/webplugin_impl.h" |
| 189 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" | 189 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" |
| 190 | 190 |
| 191 #if defined(OS_ANDROID) | 191 #if defined(OS_ANDROID) |
| 192 #include "content/renderer/media/stream_texture_factory_impl_android.h" |
| 192 #include "webkit/media/android/webmediaplayer_android.h" | 193 #include "webkit/media/android/webmediaplayer_android.h" |
| 193 #include "webkit/media/android/webmediaplayer_manager_android.h" | 194 #include "webkit/media/android/webmediaplayer_manager_android.h" |
| 194 #elif defined(OS_WIN) | 195 #elif defined(OS_WIN) |
| 195 // TODO(port): these files are currently Windows only because they concern: | 196 // TODO(port): these files are currently Windows only because they concern: |
| 196 // * theming | 197 // * theming |
| 197 #include "ui/base/native_theme/native_theme_win.h" | 198 #include "ui/base/native_theme/native_theme_win.h" |
| 198 #elif defined(USE_X11) | 199 #elif defined(USE_X11) |
| 199 #include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebRenderTheme.
h" | 200 #include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebRenderTheme.
h" |
| 200 #include "ui/base/native_theme/native_theme.h" | 201 #include "ui/base/native_theme/native_theme.h" |
| 201 #elif defined(OS_MACOSX) | 202 #elif defined(OS_MACOSX) |
| (...skipping 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2329 routing_id_); | 2330 routing_id_); |
| 2330 } | 2331 } |
| 2331 } | 2332 } |
| 2332 | 2333 |
| 2333 WebMediaPlayer* RenderViewImpl::createMediaPlayer( | 2334 WebMediaPlayer* RenderViewImpl::createMediaPlayer( |
| 2334 WebFrame* frame, WebMediaPlayerClient* client) { | 2335 WebFrame* frame, WebMediaPlayerClient* client) { |
| 2335 FOR_EACH_OBSERVER( | 2336 FOR_EACH_OBSERVER( |
| 2336 RenderViewObserver, observers_, WillCreateMediaPlayer(frame, client)); | 2337 RenderViewObserver, observers_, WillCreateMediaPlayer(frame, client)); |
| 2337 | 2338 |
| 2338 #if defined(OS_ANDROID) | 2339 #if defined(OS_ANDROID) |
| 2339 // TODO(qinmin): upstream the implementation of StreamTextureFactoryImpl | 2340 // TODO(qinmin): upstream the implementation of getting WebGraphicsContext3D |
| 2340 // to replace the NULL param here. | 2341 // and GpuChannelHost here to replace the NULL params. |
| 2341 return new webkit_media::WebMediaPlayerAndroid( | 2342 return new webkit_media::WebMediaPlayerAndroid( |
| 2342 frame, client, cookieJar(frame), media_player_manager_.get(), NULL); | 2343 frame, client, cookieJar(frame), media_player_manager_.get(), |
| 2344 new content::StreamTextureFactoryImpl(NULL, NULL, routing_id_)); |
| 2343 #endif | 2345 #endif |
| 2344 | 2346 |
| 2345 media::MessageLoopFactory* message_loop_factory = | 2347 media::MessageLoopFactory* message_loop_factory = |
| 2346 new media::MessageLoopFactory(); | 2348 new media::MessageLoopFactory(); |
| 2347 media::FilterCollection* collection = new media::FilterCollection(); | 2349 media::FilterCollection* collection = new media::FilterCollection(); |
| 2348 RenderMediaLog* render_media_log = new RenderMediaLog(); | 2350 RenderMediaLog* render_media_log = new RenderMediaLog(); |
| 2349 | 2351 |
| 2350 RenderAudioSourceProvider* audio_source_provider = NULL; | 2352 RenderAudioSourceProvider* audio_source_provider = NULL; |
| 2351 | 2353 |
| 2352 // Add in any custom filter factories first. | 2354 // Add in any custom filter factories first. |
| (...skipping 3323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5676 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5678 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5677 return !!RenderThreadImpl::current()->compositor_thread(); | 5679 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5678 } | 5680 } |
| 5679 | 5681 |
| 5680 void RenderViewImpl::OnJavaBridgeInit() { | 5682 void RenderViewImpl::OnJavaBridgeInit() { |
| 5681 DCHECK(!java_bridge_dispatcher_); | 5683 DCHECK(!java_bridge_dispatcher_); |
| 5682 #if defined(ENABLE_JAVA_BRIDGE) | 5684 #if defined(ENABLE_JAVA_BRIDGE) |
| 5683 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5685 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5684 #endif | 5686 #endif |
| 5685 } | 5687 } |
| OLD | NEW |