| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef RemoteObjectId_h | |
| 6 #define RemoteObjectId_h | |
| 7 | |
| 8 #include "platform/v8_inspector/protocol/Forward.h" | |
| 9 | |
| 10 namespace v8_inspector { | |
| 11 | |
| 12 using protocol::ErrorString; | |
| 13 | |
| 14 class RemoteObjectIdBase { | |
| 15 public: | |
| 16 int contextId() const { return m_injectedScriptId; } | |
| 17 | |
| 18 protected: | |
| 19 RemoteObjectIdBase(); | |
| 20 ~RemoteObjectIdBase() { } | |
| 21 | |
| 22 std::unique_ptr<protocol::DictionaryValue> parseInjectedScriptId(const Strin
g16&); | |
| 23 | |
| 24 int m_injectedScriptId; | |
| 25 }; | |
| 26 | |
| 27 class RemoteObjectId final : public RemoteObjectIdBase { | |
| 28 public: | |
| 29 static std::unique_ptr<RemoteObjectId> parse(ErrorString*, const String16&); | |
| 30 ~RemoteObjectId() { } | |
| 31 int id() const { return m_id; } | |
| 32 | |
| 33 private: | |
| 34 RemoteObjectId(); | |
| 35 | |
| 36 int m_id; | |
| 37 }; | |
| 38 | |
| 39 class RemoteCallFrameId final : public RemoteObjectIdBase { | |
| 40 public: | |
| 41 static std::unique_ptr<RemoteCallFrameId> parse(ErrorString*, const String16
&); | |
| 42 ~RemoteCallFrameId() { } | |
| 43 | |
| 44 int frameOrdinal() const { return m_frameOrdinal; } | |
| 45 | |
| 46 static String16 serialize(int injectedScriptId, int frameOrdinal); | |
| 47 private: | |
| 48 RemoteCallFrameId(); | |
| 49 | |
| 50 int m_frameOrdinal; | |
| 51 }; | |
| 52 | |
| 53 } // namespace v8_inspector | |
| 54 | |
| 55 #endif // !defined(RemoteObjectId_h) | |
| OLD | NEW |