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

Side by Side Diff: webkit/glue/webmediaplayer_impl.cc

Issue 149604: Begin implementation of the context menu for Video and Audio tags. (Closed)
Patch Set: Fix small style issues. Created 11 years, 5 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
« no previous file with comments | « webkit/glue/webmediaplayer_impl.h ('k') | webkit/glue/webview_delegate.h » ('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) 2008-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008-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 "webkit/glue/webmediaplayer_impl.h" 5 #include "webkit/glue/webmediaplayer_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "media/filters/ffmpeg_audio_decoder.h" 9 #include "media/filters/ffmpeg_audio_decoder.h"
10 #include "media/filters/ffmpeg_demuxer.h" 10 #include "media/filters/ffmpeg_demuxer.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 pipeline_->SetPlaybackRate(playback_rate_); 191 pipeline_->SetPlaybackRate(playback_rate_);
192 } 192 }
193 193
194 void WebMediaPlayerImpl::pause() { 194 void WebMediaPlayerImpl::pause() {
195 DCHECK(MessageLoop::current() == main_loop_); 195 DCHECK(MessageLoop::current() == main_loop_);
196 196
197 paused_ = true; 197 paused_ = true;
198 pipeline_->SetPlaybackRate(0.0f); 198 pipeline_->SetPlaybackRate(0.0f);
199 } 199 }
200 200
201 bool WebMediaPlayerImpl::supportsFullscreen() const {
202 DCHECK(MessageLoop::current() == main_loop_);
203 return true;
204 }
205
206 bool WebMediaPlayerImpl::supportsSave() const {
207 DCHECK(MessageLoop::current() == main_loop_);
208 return true;
209 }
210
201 void WebMediaPlayerImpl::seek(float seconds) { 211 void WebMediaPlayerImpl::seek(float seconds) {
202 DCHECK(MessageLoop::current() == main_loop_); 212 DCHECK(MessageLoop::current() == main_loop_);
203 213
204 // Try to preserve as much accuracy as possible. 214 // Try to preserve as much accuracy as possible.
205 float microseconds = seconds * base::Time::kMicrosecondsPerSecond; 215 float microseconds = seconds * base::Time::kMicrosecondsPerSecond;
206 if (seconds != 0) 216 if (seconds != 0)
207 pipeline_->Seek( 217 pipeline_->Seek(
208 base::TimeDelta::FromMicroseconds(static_cast<int64>(microseconds)), 218 base::TimeDelta::FromMicroseconds(static_cast<int64>(microseconds)),
209 NewCallback(proxy_.get(), 219 NewCallback(proxy_.get(),
210 &WebMediaPlayerImpl::Proxy::PipelineSeekCallback)); 220 &WebMediaPlayerImpl::Proxy::PipelineSeekCallback));
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 423 }
414 } 424 }
415 425
416 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { 426 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() {
417 DCHECK(MessageLoop::current() == main_loop_); 427 DCHECK(MessageLoop::current() == main_loop_);
418 DCHECK(client_); 428 DCHECK(client_);
419 return client_; 429 return client_;
420 } 430 }
421 431
422 } // namespace webkit_glue 432 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webmediaplayer_impl.h ('k') | webkit/glue/webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698