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

Side by Side Diff: chrome/renderer/media/simple_data_source.cc

Issue 113069: Content-Dispositon handling fix #2. Still WiP. Uploading as a check point.... Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 months 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 | « chrome/renderer/media/data_source_impl.cc ('k') | chrome/renderer/renderer_glue.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/process_util.h" 5 #include "base/process_util.h"
6 #include "chrome/renderer/media/simple_data_source.h" 6 #include "chrome/renderer/media/simple_data_source.h"
7 #include "chrome/renderer/render_thread.h" 7 #include "chrome/renderer/render_thread.h"
8 #include "chrome/renderer/render_view.h" 8 #include "chrome/renderer/render_view.h"
9 #include "chrome/renderer/webmediaplayer_delegate_impl.h" 9 #include "chrome/renderer/webmediaplayer_delegate_impl.h"
10 #include "media/base/filter_host.h" 10 #include "media/base/filter_host.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 "null", // TODO(abarth): provide main_frame_origin 43 "null", // TODO(abarth): provide main_frame_origin
44 "", 44 "",
45 net::LOAD_BYPASS_CACHE, 45 net::LOAD_BYPASS_CACHE,
46 base::GetCurrentProcId(), 46 base::GetCurrentProcId(),
47 ResourceType::MEDIA, 47 ResourceType::MEDIA,
48 0, 48 0,
49 // TODO(michaeln): delegate->mediaplayer->frame-> 49 // TODO(michaeln): delegate->mediaplayer->frame->
50 // app_cache_context()->context_id() 50 // app_cache_context()->context_id()
51 // For now don't service media resource requests from the appcache. 51 // For now don't service media resource requests from the appcache.
52 WebAppCacheContext::kNoAppCacheContextId, 52 WebAppCacheContext::kNoAppCacheContextId,
53 routing_id_)); 53 routing_id_,
54 ""));
54 render_loop_->PostTask(FROM_HERE, 55 render_loop_->PostTask(FROM_HERE,
55 NewRunnableMethod(this, &SimpleDataSource::StartTask)); 56 NewRunnableMethod(this, &SimpleDataSource::StartTask));
56 return true; 57 return true;
57 } 58 }
58 59
59 const media::MediaFormat& SimpleDataSource::media_format() { 60 const media::MediaFormat& SimpleDataSource::media_format() {
60 return media_format_; 61 return media_format_;
61 } 62 }
62 63
63 size_t SimpleDataSource::Read(uint8* data, size_t size) { 64 size_t SimpleDataSource::Read(uint8* data, size_t size) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 media_format_.Clear(); 128 media_format_.Clear();
128 media_format_.SetAsString(media::MediaFormat::kMimeType, 129 media_format_.SetAsString(media::MediaFormat::kMimeType,
129 media::mime_type::kApplicationOctetStream); 130 media::mime_type::kApplicationOctetStream);
130 media_format_.SetAsString(media::MediaFormat::kURL, url); 131 media_format_.SetAsString(media::MediaFormat::kURL, url);
131 } 132 }
132 133
133 void SimpleDataSource::StartTask() { 134 void SimpleDataSource::StartTask() {
134 DCHECK(MessageLoop::current() == render_loop_); 135 DCHECK(MessageLoop::current() == render_loop_);
135 bridge_->Start(this); 136 bridge_->Start(this);
136 } 137 }
OLDNEW
« no previous file with comments | « chrome/renderer/media/data_source_impl.cc ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698