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

Side by Side Diff: content/common/serialized_script_value.h

Issue 8082019: more content exports needed for unit_tests and browser_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert export of browser_accessibility_win for now Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
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 #ifndef CONTENT_COMMON_SERIALIZED_SCRIPT_VALUE_H_ 5 #ifndef CONTENT_COMMON_SERIALIZED_SCRIPT_VALUE_H_
6 #define CONTENT_COMMON_SERIALIZED_SCRIPT_VALUE_H_ 6 #define CONTENT_COMMON_SERIALIZED_SCRIPT_VALUE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "content/common/content_export.h"
10 11
11 namespace WebKit { 12 namespace WebKit {
12 class WebSerializedScriptValue; 13 class WebSerializedScriptValue;
13 } 14 }
14 15
15 class SerializedScriptValue { 16 class CONTENT_EXPORT SerializedScriptValue {
16 public: 17 public:
17 SerializedScriptValue(); 18 SerializedScriptValue();
18 SerializedScriptValue(bool is_null, bool is_invalid, const string16& data); 19 SerializedScriptValue(bool is_null, bool is_invalid, const string16& data);
19 explicit SerializedScriptValue(const WebKit::WebSerializedScriptValue& value); 20 explicit SerializedScriptValue(const WebKit::WebSerializedScriptValue& value);
20 21
21 void set_is_null(bool is_null) { is_null_ = is_null; } 22 void set_is_null(bool is_null) { is_null_ = is_null; }
22 bool is_null() const { return is_null_; } 23 bool is_null() const { return is_null_; }
23 24
24 void set_is_invalid(bool is_invalid) { is_invalid_ = is_invalid; } 25 void set_is_invalid(bool is_invalid) { is_invalid_ = is_invalid; }
25 bool is_invalid() const { return is_invalid_; } 26 bool is_invalid() const { return is_invalid_; }
26 27
27 void set_data(const string16& data) { data_ = data; } 28 void set_data(const string16& data) { data_ = data; }
28 const string16& data() const { return data_; } 29 const string16& data() const { return data_; }
29 30
30 void set_web_serialized_script_value( 31 void set_web_serialized_script_value(
31 const WebKit::WebSerializedScriptValue& value); 32 const WebKit::WebSerializedScriptValue& value);
32 33
33 operator WebKit::WebSerializedScriptValue() const; 34 operator WebKit::WebSerializedScriptValue() const;
34 35
35 private: 36 private:
36 bool is_null_; // Is this null? If so, none of the other properties are valid. 37 bool is_null_; // Is this null? If so, none of the other properties are valid.
37 bool is_invalid_; // Is data_ valid? 38 bool is_invalid_; // Is data_ valid?
38 string16 data_; // The wire string format of the serialized script value. 39 string16 data_; // The wire string format of the serialized script value.
39 }; 40 };
40 41
41 #endif // CONTENT_COMMON_SERIALIZED_SCRIPT_VALUE_H_ 42 #endif // CONTENT_COMMON_SERIALIZED_SCRIPT_VALUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698