| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "content/public/common/serialized_script_value.h" | 5 #include "content/public/common/serialized_script_value.h" |
| 6 | 6 |
| 7 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 7 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
| 8 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize
dScriptValue.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" |
| 9 | 9 |
| 10 using WebKit::WebSerializedScriptValue; | 10 using WebKit::WebSerializedScriptValue; |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 SerializedScriptValue::SerializedScriptValue() | 14 SerializedScriptValue::SerializedScriptValue() |
| 15 : is_null_(true), | 15 : is_null_(true), |
| 16 is_invalid_(false) { | 16 is_invalid_(false) { |
| 17 } | 17 } |
| 18 | 18 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 | 38 |
| 39 void SerializedScriptValue::set_web_serialized_script_value( | 39 void SerializedScriptValue::set_web_serialized_script_value( |
| 40 const WebSerializedScriptValue& value) { | 40 const WebSerializedScriptValue& value) { |
| 41 is_null_ = value.isNull(); | 41 is_null_ = value.isNull(); |
| 42 is_invalid_ = value.isNull() ? false : value.toString().isNull(); | 42 is_invalid_ = value.isNull() ? false : value.toString().isNull(); |
| 43 data_ = value.isNull() ? string16() : static_cast<string16>(value.toString()); | 43 data_ = value.isNull() ? string16() : static_cast<string16>(value.toString()); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace content | 46 } // namespace content |
| OLD | NEW |