summaryrefslogtreecommitdiffstats
path: root/webkit/pending
diff options
context:
space:
mode:
authorager@google.com <ager@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-23 08:34:04 +0000
committerager@google.com <ager@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-23 08:34:04 +0000
commit486b1999fbce99b437f44d1f5b10739a97b7211b (patch)
tree94549d57910b37231a4bfd269191bad57328b21d /webkit/pending
parentf1cc960cda185ea164b809e44cc3e946a996ff36 (diff)
downloadchromium_src-486b1999fbce99b437f44d1f5b10739a97b7211b.zip
chromium_src-486b1999fbce99b437f44d1f5b10739a97b7211b.tar.gz
chromium_src-486b1999fbce99b437f44d1f5b10739a97b7211b.tar.bz2
Move Peerable to its own file and use single inheritance for
NonCopyable. Review URL: http://codereview.chromium.org/4209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/pending')
-rw-r--r--webkit/pending/Peerable.h25
-rw-r--r--webkit/pending/TreeShared.h3
-rw-r--r--webkit/pending/wtf/RefCounted.h17
3 files changed, 29 insertions, 16 deletions
diff --git a/webkit/pending/Peerable.h b/webkit/pending/Peerable.h
new file mode 100644
index 0000000..75175ad
--- /dev/null
+++ b/webkit/pending/Peerable.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef Peerable_h
+#define Peerable_h
+
+#include <wtf/Noncopyable.h>
+
+#if USE(V8_BINDING)
+
+namespace WebCore {
+
+class Peerable : Noncopyable {
+public:
+ virtual void setPeer(void* peer) = 0;
+ virtual void* peer() const = 0;
+protected:
+ virtual ~Peerable() { }
+};
+
+};
+
+#endif // USE(V8_BINDING)
+#endif // Peerable_h
diff --git a/webkit/pending/TreeShared.h b/webkit/pending/TreeShared.h
index 377f381..a33fd1f 100644
--- a/webkit/pending/TreeShared.h
+++ b/webkit/pending/TreeShared.h
@@ -21,13 +21,14 @@
#ifndef TreeShared_h
#define TreeShared_h
+#include "Peerable.h"
#include "RefCounted.h"
namespace WebCore {
#if USE(V8_BINDING)
-template<class T> class TreeShared : public Peerable, Noncopyable {
+template<class T> class TreeShared : public Peerable {
public:
TreeShared() : m_refCount(0), m_parent(0), m_peer(0)
{
diff --git a/webkit/pending/wtf/RefCounted.h b/webkit/pending/wtf/RefCounted.h
index 2acf5fb..a2ed3a5 100644
--- a/webkit/pending/wtf/RefCounted.h
+++ b/webkit/pending/wtf/RefCounted.h
@@ -21,28 +21,15 @@
#ifndef RefCounted_h
#define RefCounted_h
+#include "Peerable.h"
#include <wtf/Assertions.h>
#include <wtf/Noncopyable.h>
-#if USE(V8_BINDING)
-
-namespace WebCore {
-
-class Peerable {
- public:
- virtual ~Peerable() { }
- virtual void setPeer(void* peer) = 0;
- virtual void* peer() const = 0;
-};
-
-};
-#endif
-
namespace WTF {
#if USE(V8_BINDING)
-template<class T> class RefCounted : public WebCore::Peerable, Noncopyable {
+template<class T> class RefCounted : public WebCore::Peerable {
public:
RefCounted(int initialRefCount = 0)
: m_refCount(initialRefCount)