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

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

Issue 6142009: Upating the app, ceee, chrome, ipc, media, and net directories to use the correct lock.h file. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Unified patch updating all references to the new base/synchronization/lock.h Created 9 years, 11 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/webmediaplayer_impl.h ('k') | webkit/plugins/npapi/plugin_list.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) 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/glue/webmediaplayer_impl.h" 5 #include "webkit/glue/webmediaplayer_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 outstanding_repaints_(0) { 73 outstanding_repaints_(0) {
74 DCHECK(render_loop_); 74 DCHECK(render_loop_);
75 DCHECK(webmediaplayer_); 75 DCHECK(webmediaplayer_);
76 } 76 }
77 77
78 WebMediaPlayerImpl::Proxy::~Proxy() { 78 WebMediaPlayerImpl::Proxy::~Proxy() {
79 Detach(); 79 Detach();
80 } 80 }
81 81
82 void WebMediaPlayerImpl::Proxy::Repaint() { 82 void WebMediaPlayerImpl::Proxy::Repaint() {
83 AutoLock auto_lock(lock_); 83 base::AutoLock auto_lock(lock_);
84 if (outstanding_repaints_ < kMaxOutstandingRepaints) { 84 if (outstanding_repaints_ < kMaxOutstandingRepaints) {
85 ++outstanding_repaints_; 85 ++outstanding_repaints_;
86 86
87 render_loop_->PostTask(FROM_HERE, 87 render_loop_->PostTask(FROM_HERE,
88 NewRunnableMethod(this, &WebMediaPlayerImpl::Proxy::RepaintTask)); 88 NewRunnableMethod(this, &WebMediaPlayerImpl::Proxy::RepaintTask));
89 } 89 }
90 } 90 }
91 91
92 void WebMediaPlayerImpl::Proxy::SetVideoRenderer( 92 void WebMediaPlayerImpl::Proxy::SetVideoRenderer(
93 scoped_refptr<WebVideoRenderer> video_renderer) { 93 scoped_refptr<WebVideoRenderer> video_renderer) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 void WebMediaPlayerImpl::Proxy::NetworkEventCallback() { 159 void WebMediaPlayerImpl::Proxy::NetworkEventCallback() {
160 render_loop_->PostTask(FROM_HERE, NewRunnableMethod(this, 160 render_loop_->PostTask(FROM_HERE, NewRunnableMethod(this,
161 &WebMediaPlayerImpl::Proxy::NetworkEventTask)); 161 &WebMediaPlayerImpl::Proxy::NetworkEventTask));
162 } 162 }
163 163
164 void WebMediaPlayerImpl::Proxy::RepaintTask() { 164 void WebMediaPlayerImpl::Proxy::RepaintTask() {
165 DCHECK(MessageLoop::current() == render_loop_); 165 DCHECK(MessageLoop::current() == render_loop_);
166 { 166 {
167 AutoLock auto_lock(lock_); 167 base::AutoLock auto_lock(lock_);
168 --outstanding_repaints_; 168 --outstanding_repaints_;
169 DCHECK_GE(outstanding_repaints_, 0); 169 DCHECK_GE(outstanding_repaints_, 0);
170 } 170 }
171 if (webmediaplayer_) { 171 if (webmediaplayer_) {
172 webmediaplayer_->Repaint(); 172 webmediaplayer_->Repaint();
173 } 173 }
174 } 174 }
175 175
176 void WebMediaPlayerImpl::Proxy::PipelineInitializationTask() { 176 void WebMediaPlayerImpl::Proxy::PipelineInitializationTask() {
177 DCHECK(MessageLoop::current() == render_loop_); 177 DCHECK(MessageLoop::current() == render_loop_);
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 pipeline_stopped_.Signal(); 809 pipeline_stopped_.Signal();
810 } 810 }
811 811
812 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { 812 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() {
813 DCHECK(MessageLoop::current() == main_loop_); 813 DCHECK(MessageLoop::current() == main_loop_);
814 DCHECK(client_); 814 DCHECK(client_);
815 return client_; 815 return client_;
816 } 816 }
817 817
818 } // namespace webkit_glue 818 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webmediaplayer_impl.h ('k') | webkit/plugins/npapi/plugin_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698