summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/media/buffered_data_source.cc14
-rw-r--r--webkit/glue/media/buffered_data_source.h4
-rw-r--r--webkit/glue/media/buffered_resource_loader.h1
-rw-r--r--webkit/glue/media/simple_data_source.cc14
-rw-r--r--webkit/glue/media/simple_data_source.h2
-rw-r--r--webkit/glue/webkitclient_impl.cc8
-rw-r--r--webkit/glue/webmediaplayer_impl.cc4
-rw-r--r--webkit/glue/webmediaplayer_impl.h4
8 files changed, 25 insertions, 26 deletions
diff --git a/webkit/glue/media/buffered_data_source.cc b/webkit/glue/media/buffered_data_source.cc
index b6efa16..d7a2f47 100644
--- a/webkit/glue/media/buffered_data_source.cc
+++ b/webkit/glue/media/buffered_data_source.cc
@@ -115,7 +115,7 @@ bool BufferedDataSource::IsUrlSupported(const std::string& url) {
void BufferedDataSource::Stop(media::FilterCallback* callback) {
{
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
stop_signal_received_ = true;
}
if (callback) {
@@ -166,7 +166,7 @@ void BufferedDataSource::Abort() {
// If we are told to abort, immediately return from any pending read
// with an error.
if (read_callback_.get()) {
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
DoneRead_Locked(net::ERR_FAILED);
}
@@ -414,7 +414,7 @@ void BufferedDataSource::HttpInitialStartCallback(int error) {
// let tasks on render thread to run but make sure they don't call outside
// this object when Stop() method is ever called. Locking this method is safe
// because |lock_| is only acquired in tasks on render thread.
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
if (stop_signal_received_)
return;
@@ -465,7 +465,7 @@ void BufferedDataSource::NonHttpInitialStartCallback(int error) {
// let tasks on render thread to run but make sure they don't call outside
// this object when Stop() method is ever called. Locking this method is safe
// because |lock_| is only acquired in tasks on render thread.
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
if (stop_signal_received_)
return;
@@ -504,7 +504,7 @@ void BufferedDataSource::PartialReadStartCallback(int error) {
// let tasks on render thread to run but make sure they don't call outside
// this object when Stop() method is ever called. Locking this method is
// safe because |lock_| is only acquired in tasks on render thread.
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
if (stop_signal_received_)
return;
DoneRead_Locked(net::ERR_INVALID_RESPONSE);
@@ -534,7 +534,7 @@ void BufferedDataSource::ReadCallback(int error) {
// let tasks on render thread to run but make sure they don't call outside
// this object when Stop() method is ever called. Locking this method is safe
// because |lock_| is only acquired in tasks on render thread.
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
if (stop_signal_received_)
return;
@@ -570,7 +570,7 @@ void BufferedDataSource::NetworkEventCallback() {
// let tasks on render thread to run but make sure they don't call outside
// this object when Stop() method is ever called. Locking this method is safe
// because |lock_| is only acquired in tasks on render thread.
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
if (stop_signal_received_)
return;
diff --git a/webkit/glue/media/buffered_data_source.h b/webkit/glue/media/buffered_data_source.h
index 1c4e3fa..c40b480 100644
--- a/webkit/glue/media/buffered_data_source.h
+++ b/webkit/glue/media/buffered_data_source.h
@@ -8,8 +8,8 @@
#include <string>
#include "base/callback.h"
-#include "base/lock.h"
#include "base/scoped_ptr.h"
+#include "base/synchronization/lock.h"
#include "webkit/glue/media/buffered_resource_loader.h"
namespace webkit_glue {
@@ -175,7 +175,7 @@ class BufferedDataSource : public WebDataSource {
MessageLoop* render_loop_;
// Protects |stopped_|.
- Lock lock_;
+ base::Lock lock_;
// Stop signal to suppressing activities. This variable is set on the pipeline
// thread and read from the render thread.
diff --git a/webkit/glue/media/buffered_resource_loader.h b/webkit/glue/media/buffered_resource_loader.h
index df57612..80e9632 100644
--- a/webkit/glue/media/buffered_resource_loader.h
+++ b/webkit/glue/media/buffered_resource_loader.h
@@ -8,7 +8,6 @@
#include <string>
#include "base/callback.h"
-#include "base/lock.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
#include "googleurl/src/gurl.h"
diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc
index bc2c20d..f4f92dd 100644
--- a/webkit/glue/media/simple_data_source.cc
+++ b/webkit/glue/media/simple_data_source.cc
@@ -35,12 +35,12 @@ SimpleDataSource::SimpleDataSource(
}
SimpleDataSource::~SimpleDataSource() {
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
DCHECK(state_ == UNINITIALIZED || state_ == STOPPED);
}
void SimpleDataSource::Stop(media::FilterCallback* callback) {
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
state_ = STOPPED;
if (callback) {
callback->Run();
@@ -54,7 +54,7 @@ void SimpleDataSource::Stop(media::FilterCallback* callback) {
void SimpleDataSource::Initialize(const std::string& url,
media::FilterCallback* callback) {
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
DCHECK_EQ(state_, UNINITIALIZED);
DCHECK(callback);
state_ = INITIALIZING;
@@ -157,7 +157,7 @@ void SimpleDataSource::didFinishLoading(
WebKit::WebURLLoader* loader,
double finishTime) {
DCHECK(MessageLoop::current() == render_loop_);
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
// It's possible this gets called after Stop(), in which case |host_| is no
// longer valid.
if (state_ == STOPPED)
@@ -179,7 +179,7 @@ void SimpleDataSource::didFail(
WebKit::WebURLLoader* loader,
const WebKit::WebURLError& error) {
DCHECK(MessageLoop::current() == render_loop_);
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
// It's possible this gets called after Stop(), in which case |host_| is no
// longer valid.
if (state_ == STOPPED)
@@ -217,7 +217,7 @@ void SimpleDataSource::SetURL(const GURL& url) {
void SimpleDataSource::StartTask() {
DCHECK(MessageLoop::current() == render_loop_);
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
// We may have stopped.
if (state_ == STOPPED)
@@ -253,7 +253,7 @@ void SimpleDataSource::StartTask() {
void SimpleDataSource::CancelTask() {
DCHECK(MessageLoop::current() == render_loop_);
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
DCHECK_EQ(state_, STOPPED);
// Cancel any pending requests.
diff --git a/webkit/glue/media/simple_data_source.h b/webkit/glue/media/simple_data_source.h
index 2e415f0..10d93ff 100644
--- a/webkit/glue/media/simple_data_source.h
+++ b/webkit/glue/media/simple_data_source.h
@@ -120,7 +120,7 @@ class SimpleDataSource : public WebDataSource,
State state_;
// Used for accessing |state_|.
- Lock lock_;
+ base::Lock lock_;
// Filter callbacks.
scoped_ptr<media::FilterCallback> initialize_callback_;
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index b4da504..c93fdfd 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -13,7 +13,6 @@
#include <vector>
#include "base/debug/trace_event.h"
-#include "base/lock.h"
#include "base/message_loop.h"
#include "base/metrics/stats_counters.h"
#include "base/metrics/histogram.h"
@@ -22,6 +21,7 @@
#include "base/singleton.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/synchronization/lock.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "grit/webkit_resources.h"
@@ -78,7 +78,7 @@ class MemoryUsageCache {
// Returns true if the cached value is fresh.
// Returns false if the cached value is stale, or if |cached_value| is NULL.
bool IsCachedValueValid(size_t* cached_value) {
- AutoLock scoped_lock(lock_);
+ base::AutoLock scoped_lock(lock_);
if (!cached_value)
return false;
if (base::Time::Now() - last_updated_time_ > cache_valid_time_)
@@ -89,7 +89,7 @@ class MemoryUsageCache {
// Setter for |memory_value_|, refreshes |last_updated_time_|.
void SetMemoryValue(const size_t value) {
- AutoLock scoped_lock(lock_);
+ base::AutoLock scoped_lock(lock_);
memory_value_ = value;
last_updated_time_ = base::Time::Now();
}
@@ -104,7 +104,7 @@ class MemoryUsageCache {
// The last time the cached value was updated.
base::Time last_updated_time_;
- Lock lock_;
+ base::Lock lock_;
};
} // anonymous namespace
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index b97eb8d..b9df79d 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -80,7 +80,7 @@ WebMediaPlayerImpl::Proxy::~Proxy() {
}
void WebMediaPlayerImpl::Proxy::Repaint() {
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
if (outstanding_repaints_ < kMaxOutstandingRepaints) {
++outstanding_repaints_;
@@ -164,7 +164,7 @@ void WebMediaPlayerImpl::Proxy::NetworkEventCallback() {
void WebMediaPlayerImpl::Proxy::RepaintTask() {
DCHECK(MessageLoop::current() == render_loop_);
{
- AutoLock auto_lock(lock_);
+ base::AutoLock auto_lock(lock_);
--outstanding_repaints_;
DCHECK_GE(outstanding_repaints_, 0);
}
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
index 33cc7b2..d388aef 100644
--- a/webkit/glue/webmediaplayer_impl.h
+++ b/webkit/glue/webmediaplayer_impl.h
@@ -53,11 +53,11 @@
#ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_
#define WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_
-#include "base/lock.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/threading/thread.h"
+#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
#include "gfx/rect.h"
#include "gfx/size.h"
@@ -149,7 +149,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
scoped_refptr<WebDataSource> data_source_;
scoped_refptr<WebVideoRenderer> video_renderer_;
- Lock lock_;
+ base::Lock lock_;
int outstanding_repaints_;
};