Index: third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp |
diff --git a/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp b/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp |
deleted file mode 100644 |
index eb86a42992c3dca1618a3679e5d128b3cbeb44d5..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp |
+++ /dev/null |
@@ -1,71 +0,0 @@ |
-// Copyright 2015 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "platform/v8_inspector/RemoteObjectId.h" |
- |
-#include "platform/v8_inspector/StringUtil.h" |
-#include "platform/v8_inspector/protocol/Protocol.h" |
- |
-namespace v8_inspector { |
- |
-RemoteObjectIdBase::RemoteObjectIdBase() : m_injectedScriptId(0) { } |
- |
-std::unique_ptr<protocol::DictionaryValue> RemoteObjectIdBase::parseInjectedScriptId(const String16& objectId) |
-{ |
- std::unique_ptr<protocol::Value> parsedValue = protocol::parseJSON(objectId); |
- if (!parsedValue || parsedValue->type() != protocol::Value::TypeObject) |
- return nullptr; |
- |
- std::unique_ptr<protocol::DictionaryValue> parsedObjectId(protocol::DictionaryValue::cast(parsedValue.release())); |
- bool success = parsedObjectId->getInteger("injectedScriptId", &m_injectedScriptId); |
- if (success) |
- return parsedObjectId; |
- return nullptr; |
-} |
- |
-RemoteObjectId::RemoteObjectId() : RemoteObjectIdBase(), m_id(0) { } |
- |
-std::unique_ptr<RemoteObjectId> RemoteObjectId::parse(ErrorString* errorString, const String16& objectId) |
-{ |
- std::unique_ptr<RemoteObjectId> result(new RemoteObjectId()); |
- std::unique_ptr<protocol::DictionaryValue> parsedObjectId = result->parseInjectedScriptId(objectId); |
- if (!parsedObjectId) { |
- *errorString = "Invalid remote object id"; |
- return nullptr; |
- } |
- |
- bool success = parsedObjectId->getInteger("id", &result->m_id); |
- if (!success) { |
- *errorString = "Invalid remote object id"; |
- return nullptr; |
- } |
- return result; |
-} |
- |
-RemoteCallFrameId::RemoteCallFrameId() : RemoteObjectIdBase(), m_frameOrdinal(0) { } |
- |
-std::unique_ptr<RemoteCallFrameId> RemoteCallFrameId::parse(ErrorString* errorString, const String16& objectId) |
-{ |
- std::unique_ptr<RemoteCallFrameId> result(new RemoteCallFrameId()); |
- std::unique_ptr<protocol::DictionaryValue> parsedObjectId = result->parseInjectedScriptId(objectId); |
- if (!parsedObjectId) { |
- *errorString = "Invalid call frame id"; |
- return nullptr; |
- } |
- |
- bool success = parsedObjectId->getInteger("ordinal", &result->m_frameOrdinal); |
- if (!success) { |
- *errorString = "Invalid call frame id"; |
- return nullptr; |
- } |
- |
- return result; |
-} |
- |
-String16 RemoteCallFrameId::serialize(int injectedScriptId, int frameOrdinal) |
-{ |
- return "{\"ordinal\":" + String16::fromInteger(frameOrdinal) + ",\"injectedScriptId\":" + String16::fromInteger(injectedScriptId) + "}"; |
-} |
- |
-} // namespace v8_inspector |