Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: third_party/WebKit/Source/platform/inspector_protocol/Object.cpp

Issue 2238423002: [DevTools] Generate all files in inspector_protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2240663003
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 #include "platform/inspector_protocol/Object.h"
6
7 namespace blink {
8 namespace protocol {
9
10 std::unique_ptr<Object> Object::parse(protocol::Value* value, ErrorSupport* erro rs)
11 {
12 protocol::DictionaryValue* object = DictionaryValue::cast(value);
13 if (!object) {
14 errors->addError("object expected");
15 return nullptr;
16 }
17 return wrapUnique(new Object(wrapUnique(static_cast<DictionaryValue*>(object ->clone().release()))));
18 }
19
20 std::unique_ptr<protocol::DictionaryValue> Object::serialize() const
21 {
22 return DictionaryValue::cast(m_object->clone());
23 }
24
25 std::unique_ptr<Object> Object::clone() const
26 {
27 return wrapUnique(new Object(DictionaryValue::cast(m_object->clone())));
28 }
29
30 Object::Object(std::unique_ptr<protocol::DictionaryValue> object) : m_object(std ::move(object)) { }
31
32 Object::~Object() { }
33
34 } // namespace protocol
35 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698