OLD | NEW |
| (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/ValueConversions.h" | |
6 | |
7 namespace blink { | |
8 namespace protocol { | |
9 | |
10 std::unique_ptr<protocol::Value> toValue(int value) | |
11 { | |
12 return FundamentalValue::create(value); | |
13 } | |
14 | |
15 std::unique_ptr<protocol::Value> toValue(double value) | |
16 { | |
17 return FundamentalValue::create(value); | |
18 } | |
19 | |
20 std::unique_ptr<protocol::Value> toValue(bool value) | |
21 { | |
22 return FundamentalValue::create(value); | |
23 } | |
24 | |
25 std::unique_ptr<protocol::Value> toValue(const String16& param) | |
26 { | |
27 return StringValue::create(param); | |
28 } | |
29 | |
30 std::unique_ptr<protocol::Value> toValue(const String& param) | |
31 { | |
32 return StringValue::create(param); | |
33 } | |
34 | |
35 std::unique_ptr<protocol::Value> toValue(Value* param) | |
36 { | |
37 return param->clone(); | |
38 } | |
39 | |
40 std::unique_ptr<protocol::Value> toValue(DictionaryValue* param) | |
41 { | |
42 return param->clone(); | |
43 } | |
44 | |
45 std::unique_ptr<protocol::Value> toValue(ListValue* param) | |
46 { | |
47 return param->clone(); | |
48 } | |
49 | |
50 } // namespace protocol | |
51 } // namespace blink | |
OLD | NEW |