Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: webkit/support/webkit_support.cc

Issue 3863002: Refactoring BufferedDataSource to work with WebURLLoader instead of a MediaResourceLoaderBridge. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: little indent Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webmediaplayer_impl.cc ('k') | webkit/tools/test_shell/test_shell.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/support/webkit_support.h" 5 #include "webkit/support/webkit_support.h"
6 6
7 #include "app/gfx/gl/gl_implementation.h" 7 #include "app/gfx/gl/gl_implementation.h"
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 261 }
262 262
263 return new WebPluginImplWithPageDelegate( 263 return new WebPluginImplWithPageDelegate(
264 frame, params, info.path, actual_mime_type); 264 frame, params, info.path, actual_mime_type);
265 } 265 }
266 266
267 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, 267 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame,
268 WebMediaPlayerClient* client) { 268 WebMediaPlayerClient* client) {
269 scoped_ptr<media::MediaFilterCollection> collection( 269 scoped_ptr<media::MediaFilterCollection> collection(
270 new media::MediaFilterCollection()); 270 new media::MediaFilterCollection());
271 271 /*
272 appcache::WebApplicationCacheHostImpl* appcache_host = 272 appcache::WebApplicationCacheHostImpl* appcache_host =
273 appcache::WebApplicationCacheHostImpl::FromFrame(frame); 273 appcache::WebApplicationCacheHostImpl::FromFrame(frame);
274 274 */
275 // TODO(hclam): this is the same piece of code as in RenderView, maybe they
276 // should be grouped together.
277 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory_simple =
278 new webkit_glue::MediaResourceLoaderBridgeFactory(
279 GURL(), // referrer
280 "null", // frame origin
281 "null", // main_frame_origin
282 base::GetCurrentProcId(),
283 appcache_host ? appcache_host->host_id() : appcache::kNoHostId,
284 0);
285 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory_buffered =
286 new webkit_glue::MediaResourceLoaderBridgeFactory(
287 GURL(), // referrer
288 "null", // frame origin
289 "null", // main_frame_origin
290 base::GetCurrentProcId(),
291 appcache_host ? appcache_host->host_id() : appcache::kNoHostId,
292 0);
293
294 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( 275 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer(
295 new webkit_glue::VideoRendererImpl(false)); 276 new webkit_glue::VideoRendererImpl(false));
296 collection->AddVideoRenderer(video_renderer); 277 collection->AddVideoRenderer(video_renderer);
297 278
298 return new webkit_glue::WebMediaPlayerImpl( 279 return new webkit_glue::WebMediaPlayerImpl(
299 client, collection.release(), bridge_factory_simple, 280 client, collection.release(), frame, false, video_renderer);
300 bridge_factory_buffered, false, video_renderer);
301 } 281 }
302 282
303 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( 283 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost(
304 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { 284 WebFrame*, WebKit::WebApplicationCacheHostClient* client) {
305 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); 285 return SimpleAppCacheSystem::CreateApplicationCacheHost(client);
306 } 286 }
307 287
308 WebKit::WebString GetWebKitRootDir() { 288 WebKit::WebString GetWebKitRootDir() {
309 FilePath path = GetWebKitRootDirFilePath(); 289 FilePath path = GetWebKitRootDirFilePath();
310 return WebKit::WebString::fromUTF8(WideToUTF8(path.ToWStringHack()).c_str()); 290 return WebKit::WebString::fromUTF8(WideToUTF8(path.ToWStringHack()).c_str());
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 525
546 // FileSystem 526 // FileSystem
547 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, 527 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type,
548 long long size, bool create, WebFileSystemCallbacks* callbacks) { 528 long long size, bool create, WebFileSystemCallbacks* callbacks) {
549 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( 529 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
550 test_environment->webkit_client()->fileSystem()); 530 test_environment->webkit_client()->fileSystem());
551 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); 531 fileSystem->OpenFileSystem(frame, type, size, create, callbacks);
552 } 532 }
553 533
554 } // namespace webkit_support 534 } // namespace webkit_support
OLDNEW
« no previous file with comments | « webkit/glue/webmediaplayer_impl.cc ('k') | webkit/tools/test_shell/test_shell.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698