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

Unified Diff: Source/core/inspector/InspectorHistory.h

Issue 208893007: DevTools: InspectorHistory actions become refcounted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | Source/core/inspector/InspectorHistory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorHistory.h
diff --git a/Source/core/inspector/InspectorHistory.h b/Source/core/inspector/InspectorHistory.h
index 049684efccab232d10301074f59b963cf5053dc9..d0e70c78079dec4d4768215a1b8ba33c4736c92b 100644
--- a/Source/core/inspector/InspectorHistory.h
+++ b/Source/core/inspector/InspectorHistory.h
@@ -31,7 +31,7 @@
#ifndef InspectorHistory_h
#define InspectorHistory_h
-#include "wtf/OwnPtr.h"
+#include "wtf/RefPtr.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
@@ -42,7 +42,7 @@ class ExceptionState;
class InspectorHistory FINAL {
WTF_MAKE_NONCOPYABLE(InspectorHistory); WTF_MAKE_FAST_ALLOCATED;
public:
- class Action {
+ class Action : public RefCounted<Action> {
WTF_MAKE_FAST_ALLOCATED;
public:
Action(const String& name);
@@ -50,7 +50,7 @@ public:
virtual String toString();
virtual String mergeId();
- virtual void merge(PassOwnPtr<Action>);
+ virtual void merge(PassRefPtr<Action>);
virtual bool perform(ExceptionState&) = 0;
@@ -64,7 +64,7 @@ public:
InspectorHistory();
- bool perform(PassOwnPtr<Action>, ExceptionState&);
+ bool perform(PassRefPtr<Action>, ExceptionState&);
void markUndoableState();
bool undo(ExceptionState&);
@@ -72,7 +72,7 @@ public:
void reset();
private:
- Vector<OwnPtr<Action> > m_history;
+ Vector<RefPtr<Action> > m_history;
size_t m_afterLastActionIndex;
};
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | Source/core/inspector/InspectorHistory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698