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

Side by Side Diff: third_party/WebKit/Source/platform/inspector_protocol/lib/Values_cpp.template

Issue 2282283002: [DevTools] Prepare inspector_protocol build to move. (Closed)
Patch Set: NOTREACHED Created 4 years, 3 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 //#include "Values.h" 5 //#include "Values.h"
6 6
7 {% for namespace in config.protocol.namespace %} 7 {% for namespace in config.protocol.namespace %}
8 namespace {{namespace}} { 8 namespace {{namespace}} {
9 {% endfor %} 9 {% endfor %}
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 } 161 }
162 162
163 std::unique_ptr<Value> FundamentalValue::clone() const 163 std::unique_ptr<Value> FundamentalValue::clone() const
164 { 164 {
165 switch (type()) { 165 switch (type()) {
166 case TypeDouble: return FundamentalValue::create(m_doubleValue); 166 case TypeDouble: return FundamentalValue::create(m_doubleValue);
167 case TypeInteger: return FundamentalValue::create(m_integerValue); 167 case TypeInteger: return FundamentalValue::create(m_integerValue);
168 case TypeBoolean: return FundamentalValue::create(m_boolValue); 168 case TypeBoolean: return FundamentalValue::create(m_boolValue);
169 default: 169 default:
170 NOTREACHED(); 170 DCHECK(false);
171 } 171 }
172 return nullptr; 172 return nullptr;
173 } 173 }
174 174
175 bool StringValue::asString(String* output) const 175 bool StringValue::asString(String* output) const
176 { 176 {
177 *output = m_stringValue; 177 *output = m_stringValue;
178 return true; 178 return true;
179 } 179 }
180 180
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 398
399 protocol::Value* ListValue::at(size_t index) 399 protocol::Value* ListValue::at(size_t index)
400 { 400 {
401 DCHECK_LT(index, m_data.size()); 401 DCHECK_LT(index, m_data.size());
402 return m_data[index].get(); 402 return m_data[index].get();
403 } 403 }
404 404
405 {% for namespace in config.protocol.namespace %} 405 {% for namespace in config.protocol.namespace %}
406 } // namespace {{namespace}} 406 } // namespace {{namespace}}
407 {% endfor %} 407 {% endfor %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698