summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-21 04:55:52 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-21 04:55:52 +0000
commit20305ec6f1acf21392c2f3938a14a96f1e28e76d (patch)
tree6eff1f7be4bad1a1362d3466f0ac59292dc51acc /gfx
parentc6e8346b56ab61b35845aefcf9b241c654fe1253 (diff)
downloadchromium_src-20305ec6f1acf21392c2f3938a14a96f1e28e76d.zip
chromium_src-20305ec6f1acf21392c2f3938a14a96f1e28e76d.tar.gz
chromium_src-20305ec6f1acf21392c2f3938a14a96f1e28e76d.tar.bz2
Remove obsolete base/lock.h and fix up callers to use the new header file and
the base namespace. Fix several files including lock.h unnecessarily. BUG=none TEST=none Original review=http://codereview.chromium.org/6142009/ Patch by leviw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98
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.