OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include <wtf/OwnPtr.h> | 36 #include <wtf/OwnPtr.h> |
37 #include <wtf/Vector.h> | 37 #include <wtf/Vector.h> |
38 #include <wtf/text/WTFString.h> | 38 #include <wtf/text/WTFString.h> |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 class ContainerNode; | 42 class ContainerNode; |
43 class Element; | 43 class Element; |
44 class Node; | 44 class Node; |
45 | 45 |
46 #if ENABLE(INSPECTOR) | |
47 | 46 |
48 class InspectorHistory { | 47 class InspectorHistory { |
49 WTF_MAKE_NONCOPYABLE(InspectorHistory); WTF_MAKE_FAST_ALLOCATED; | 48 WTF_MAKE_NONCOPYABLE(InspectorHistory); WTF_MAKE_FAST_ALLOCATED; |
50 public: | 49 public: |
51 class Action { | 50 class Action { |
52 WTF_MAKE_FAST_ALLOCATED; | 51 WTF_MAKE_FAST_ALLOCATED; |
53 public: | 52 public: |
54 Action(const String& name); | 53 Action(const String& name); |
55 virtual ~Action(); | 54 virtual ~Action(); |
56 virtual String toString(); | 55 virtual String toString(); |
(...skipping 19 matching lines...) Expand all Loading... |
76 | 75 |
77 bool undo(ExceptionCode&); | 76 bool undo(ExceptionCode&); |
78 bool redo(ExceptionCode&); | 77 bool redo(ExceptionCode&); |
79 void reset(); | 78 void reset(); |
80 | 79 |
81 private: | 80 private: |
82 Vector<OwnPtr<Action> > m_history; | 81 Vector<OwnPtr<Action> > m_history; |
83 size_t m_afterLastActionIndex; | 82 size_t m_afterLastActionIndex; |
84 }; | 83 }; |
85 | 84 |
86 #endif // ENABLE(INSPECTOR) | |
87 | 85 |
88 } // namespace WebCore | 86 } // namespace WebCore |
89 | 87 |
90 #endif // !defined(InspectorHistory_h) | 88 #endif // !defined(InspectorHistory_h) |
OLD | NEW |