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

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

Issue 164356: Add disabled play and mute icons for media player. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « webkit/glue/webkitclient_impl.cc ('k') | webkit/tools/test_shell/test_shell_win.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) 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/base/media_format.h" 9 #include "media/base/media_format.h"
10 #include "media/filters/ffmpeg_audio_decoder.h" 10 #include "media/filters/ffmpeg_audio_decoder.h"
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 break; 476 break;
477 477
478 case media::PIPELINE_ERROR_DECODE: 478 case media::PIPELINE_ERROR_DECODE:
479 case media::PIPELINE_ERROR_ABORT: 479 case media::PIPELINE_ERROR_ABORT:
480 case media::PIPELINE_ERROR_OUT_OF_MEMORY: 480 case media::PIPELINE_ERROR_OUT_OF_MEMORY:
481 case media::PIPELINE_ERROR_AUDIO_HARDWARE: 481 case media::PIPELINE_ERROR_AUDIO_HARDWARE:
482 // Decode error. 482 // Decode error.
483 SetNetworkState(WebMediaPlayer::DecodeError); 483 SetNetworkState(WebMediaPlayer::DecodeError);
484 break; 484 break;
485 } 485 }
486
487 // Repaint to trigger UI update.
488 Repaint();
486 } 489 }
487 490
488 void WebMediaPlayerImpl::SetNetworkState( 491 void WebMediaPlayerImpl::SetNetworkState(
489 WebKit::WebMediaPlayer::NetworkState state) { 492 WebKit::WebMediaPlayer::NetworkState state) {
490 DCHECK(MessageLoop::current() == main_loop_); 493 DCHECK(MessageLoop::current() == main_loop_);
491 if (network_state_ != state) { 494 if (network_state_ != state) {
492 network_state_ = state; 495 network_state_ = state;
493 GetClient()->networkStateChanged(); 496 GetClient()->networkStateChanged();
494 } 497 }
495 } 498 }
(...skipping 23 matching lines...) Expand all
519 } 522 }
520 } 523 }
521 524
522 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { 525 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() {
523 DCHECK(MessageLoop::current() == main_loop_); 526 DCHECK(MessageLoop::current() == main_loop_);
524 DCHECK(client_); 527 DCHECK(client_);
525 return client_; 528 return client_;
526 } 529 }
527 530
528 } // namespace webkit_glue 531 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webkitclient_impl.cc ('k') | webkit/tools/test_shell/test_shell_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698