OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, 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 24 matching lines...) Expand all Loading... |
35 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
36 | 36 |
37 namespace v8 { | 37 namespace v8 { |
38 class HeapSnapshot; | 38 class HeapSnapshot; |
39 } | 39 } |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 typedef uint32_t SnapshotObjectId; | 43 typedef uint32_t SnapshotObjectId; |
44 | 44 |
45 class ScriptHeapSnapshot : public RefCounted<ScriptHeapSnapshot> { | 45 class ScriptHeapSnapshot FINAL : public RefCounted<ScriptHeapSnapshot> { |
46 public: | 46 public: |
47 class OutputStream { | 47 class OutputStream { |
48 public: | 48 public: |
49 virtual ~OutputStream() { } | 49 virtual ~OutputStream() { } |
50 virtual void Write(const String& chunk) = 0; | 50 virtual void Write(const String& chunk) = 0; |
51 virtual void Close() = 0; | 51 virtual void Close() = 0; |
52 }; | 52 }; |
53 | 53 |
54 static PassRefPtr<ScriptHeapSnapshot> create(const v8::HeapSnapshot* snapsho
t) | 54 static PassRefPtr<ScriptHeapSnapshot> create(const v8::HeapSnapshot* snapsho
t) |
55 { | 55 { |
(...skipping 10 matching lines...) Expand all Loading... |
66 ScriptHeapSnapshot(const v8::HeapSnapshot* snapshot) | 66 ScriptHeapSnapshot(const v8::HeapSnapshot* snapshot) |
67 : m_snapshot(snapshot) | 67 : m_snapshot(snapshot) |
68 {} | 68 {} |
69 | 69 |
70 const v8::HeapSnapshot* m_snapshot; | 70 const v8::HeapSnapshot* m_snapshot; |
71 }; | 71 }; |
72 | 72 |
73 } // namespace WebCore | 73 } // namespace WebCore |
74 | 74 |
75 #endif // ScriptHeapSnapshot_h | 75 #endif // ScriptHeapSnapshot_h |
OLD | NEW |