| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef RemoteObjectId_h | 5 #ifndef RemoteObjectId_h |
| 6 #define RemoteObjectId_h | 6 #define RemoteObjectId_h |
| 7 | 7 |
| 8 #include "wtf/Allocator.h" | 8 #include "wtf/Allocator.h" |
| 9 #include "wtf/Forward.h" | 9 #include "wtf/Forward.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class JSONObject; | 13 namespace protocol { |
| 14 class DictionaryValue; |
| 15 } |
| 14 | 16 |
| 15 class RemoteObjectIdBase { | 17 class RemoteObjectIdBase { |
| 16 USING_FAST_MALLOC(RemoteObjectIdBase); | 18 USING_FAST_MALLOC(RemoteObjectIdBase); |
| 17 public: | 19 public: |
| 18 int contextId() const { return m_injectedScriptId; } | 20 int contextId() const { return m_injectedScriptId; } |
| 19 | 21 |
| 20 protected: | 22 protected: |
| 21 RemoteObjectIdBase(); | 23 RemoteObjectIdBase(); |
| 22 ~RemoteObjectIdBase() { } | 24 ~RemoteObjectIdBase() { } |
| 23 | 25 |
| 24 PassRefPtr<JSONObject> parseInjectedScriptId(const String&); | 26 PassRefPtr<protocol::DictionaryValue> parseInjectedScriptId(const String&); |
| 25 | 27 |
| 26 int m_injectedScriptId; | 28 int m_injectedScriptId; |
| 27 }; | 29 }; |
| 28 | 30 |
| 29 class RemoteObjectId final : public RemoteObjectIdBase { | 31 class RemoteObjectId final : public RemoteObjectIdBase { |
| 30 public: | 32 public: |
| 31 static PassOwnPtr<RemoteObjectId> parse(const String&); | 33 static PassOwnPtr<RemoteObjectId> parse(const String&); |
| 32 ~RemoteObjectId() { } | 34 ~RemoteObjectId() { } |
| 33 int id() const { return m_id; } | 35 int id() const { return m_id; } |
| 34 | 36 |
| 35 private: | 37 private: |
| 36 RemoteObjectId(); | 38 RemoteObjectId(); |
| 37 | 39 |
| 38 int m_id; | 40 int m_id; |
| 39 }; | 41 }; |
| 40 | 42 |
| 41 class RemoteCallFrameId final : public RemoteObjectIdBase { | 43 class RemoteCallFrameId final : public RemoteObjectIdBase { |
| 42 public: | 44 public: |
| 43 static PassOwnPtr<RemoteCallFrameId> parse(const String&); | 45 static PassOwnPtr<RemoteCallFrameId> parse(const String&); |
| 44 ~RemoteCallFrameId() { } | 46 ~RemoteCallFrameId() { } |
| 45 | 47 |
| 46 unsigned frameOrdinal() const { return m_frameOrdinal; } | 48 int frameOrdinal() const { return m_frameOrdinal; } |
| 47 unsigned asyncStackOrdinal() const { return m_asyncStackOrdinal; } | 49 int asyncStackOrdinal() const { return m_asyncStackOrdinal; } |
| 48 | 50 |
| 49 private: | 51 private: |
| 50 RemoteCallFrameId(); | 52 RemoteCallFrameId(); |
| 51 | 53 |
| 52 unsigned m_frameOrdinal; | 54 int m_frameOrdinal; |
| 53 unsigned m_asyncStackOrdinal; | 55 int m_asyncStackOrdinal; |
| 54 }; | 56 }; |
| 55 | 57 |
| 56 } // namespace blink | 58 } // namespace blink |
| 57 | 59 |
| 58 #endif // !defined(RemoteObjectId_h) | 60 #endif // !defined(RemoteObjectId_h) |
| OLD | NEW |