summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'gfx')
-rw-r--r--gfx/gtk_native_view_id_manager.cc16
-rw-r--r--gfx/gtk_native_view_id_manager.h7
2 files changed, 12 insertions, 11 deletions
diff --git a/gfx/gtk_native_view_id_manager.cc b/gfx/gtk_native_view_id_manager.cc
index 904f46b..e9e72f2 100644
--- a/gfx/gtk_native_view_id_manager.cc
+++ b/gfx/gtk_native_view_id_manager.cc
@@ -51,7 +51,7 @@ gfx::NativeViewId GtkNativeViewManager::GetIdForWidget(gfx::NativeView widget) {
if (!widget)
return 0;
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
std::map<gfx::NativeView, gfx::NativeViewId>::const_iterator i =
native_view_to_id_.find(widget);
@@ -83,7 +83,7 @@ gfx::NativeViewId GtkNativeViewManager::GetIdForWidget(gfx::NativeView widget) {
}
bool GtkNativeViewManager::GetXIDForId(XID* output, gfx::NativeViewId id) {
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
std::map<gfx::NativeViewId, NativeViewInfo>::const_iterator i =
id_to_info_.find(id);
@@ -97,7 +97,7 @@ bool GtkNativeViewManager::GetXIDForId(XID* output, gfx::NativeViewId id) {
bool GtkNativeViewManager::GetPermanentXIDForId(XID* output,
gfx::NativeViewId id) {
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
std::map<gfx::NativeViewId, NativeViewInfo>::iterator i =
id_to_info_.find(id);
@@ -130,7 +130,7 @@ bool GtkNativeViewManager::GetPermanentXIDForId(XID* output,
}
void GtkNativeViewManager::ReleasePermanentXID(XID xid) {
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
std::map<XID, PermanentXIDInfo>::iterator i =
perm_xid_to_info_.find(xid);
@@ -170,7 +170,7 @@ gfx::NativeViewId GtkNativeViewManager::GetWidgetId(gfx::NativeView widget) {
}
void GtkNativeViewManager::OnRealize(gfx::NativeView widget) {
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
const gfx::NativeViewId id = GetWidgetId(widget);
std::map<gfx::NativeViewId, NativeViewInfo>::iterator i =
@@ -183,8 +183,8 @@ void GtkNativeViewManager::OnRealize(gfx::NativeView widget) {
}
void GtkNativeViewManager::OnUnrealize(gfx::NativeView widget) {
- AutoLock unrealize_locked(unrealize_lock_);
- AutoLock locked(lock_);
+ base::AutoLock unrealize_locked(unrealize_lock_);
+ base::AutoLock locked(lock_);
const gfx::NativeViewId id = GetWidgetId(widget);
std::map<gfx::NativeViewId, NativeViewInfo>::iterator i =
@@ -194,7 +194,7 @@ void GtkNativeViewManager::OnUnrealize(gfx::NativeView widget) {
}
void GtkNativeViewManager::OnDestroy(gfx::NativeView widget) {
- AutoLock locked(lock_);
+ base::AutoLock locked(lock_);
std::map<gfx::NativeView, gfx::NativeViewId>::iterator i =
native_view_to_id_.find(widget);
diff --git a/gfx/gtk_native_view_id_manager.h b/gfx/gtk_native_view_id_manager.h
index e97a852..8772bc8 100644
--- a/gfx/gtk_native_view_id_manager.h
+++ b/gfx/gtk_native_view_id_manager.h
@@ -9,6 +9,7 @@
#include <map>
#include "base/singleton.h"
+#include "base/synchronization/lock.h"
#include "gfx/native_widget_types.h"
typedef unsigned long XID;
@@ -84,7 +85,7 @@ class GtkNativeViewManager {
void OnUnrealize(gfx::NativeView widget);
void OnDestroy(gfx::NativeView widget);
- Lock& unrealize_lock() { return unrealize_lock_; }
+ base::Lock& unrealize_lock() { return unrealize_lock_; }
private:
// This object is a singleton:
@@ -104,10 +105,10 @@ class GtkNativeViewManager {
// This lock can be used to block GTK from unrealizing windows. This is needed
// when the BACKGROUND_X11 thread is using a window obtained via GetXIDForId,
// and can't allow the X11 resource to be deleted.
- Lock unrealize_lock_;
+ base::Lock unrealize_lock_;
// protects native_view_to_id_ and id_to_info_
- Lock lock_;
+ base::Lock lock_;
// If asked for an id for the same widget twice, we want to return the same
// id. So this records the current mapping.