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

Side by Side Diff: content/renderer/v8_value_converter_impl.h

Issue 10387055: Support optional arguments in SendRequestNatives::StartRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated copyright header Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_
6 #define CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ 6 #define CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/renderer/v8_value_converter.h" 10 #include "content/public/renderer/v8_value_converter.h"
11 11
12 namespace base { 12 namespace base {
13 class BinaryValue; 13 class BinaryValue;
14 class DictionaryValue; 14 class DictionaryValue;
15 class ListValue; 15 class ListValue;
16 class Value; 16 class Value;
17 } 17 }
18 18
19 class CONTENT_EXPORT V8ValueConverterImpl : public content::V8ValueConverter { 19 class CONTENT_EXPORT V8ValueConverterImpl : public content::V8ValueConverter {
20 public: 20 public:
21 V8ValueConverterImpl(); 21 V8ValueConverterImpl();
22 22
23 // Use the following setters to support additional types other than the 23 // Use the following setters to support additional types other than the
24 // default ones. 24 // default ones.
25 bool allow_undefined() const { return allow_undefined_; } 25 virtual bool IsAllowIndefined() const OVERRIDE;
26 void set_allow_undefined(bool val) { allow_undefined_ = val; } 26 virtual void SetAllowUndefined(bool val) OVERRIDE;
27 27
28 bool allow_date() const { return allow_date_; } 28 virtual bool IsAllowDate() const OVERRIDE;
29 void set_allow_date(bool val) { allow_date_ = val; } 29 virtual void SetAllowDate(bool val) OVERRIDE;
30 30
31 bool allow_regexp() const { return allow_regexp_; } 31 virtual bool IsAllowRegexp() const OVERRIDE;
32 void set_allow_regexp(bool val) { allow_regexp_ = val; } 32 virtual void SetAllowRegexp(bool val) OVERRIDE;
33 33
34 // V8ValueConverter implementation. 34 // V8ValueConverter implementation.
35 virtual v8::Handle<v8::Value> ToV8Value( 35 virtual v8::Handle<v8::Value> ToV8Value(
36 const base::Value* value, 36 const base::Value* value,
37 v8::Handle<v8::Context> context) const OVERRIDE; 37 v8::Handle<v8::Context> context) const OVERRIDE;
38 virtual base::Value* FromV8Value( 38 virtual base::Value* FromV8Value(
39 v8::Handle<v8::Value> value, 39 v8::Handle<v8::Value> value,
40 v8::Handle<v8::Context> context) const OVERRIDE; 40 v8::Handle<v8::Context> context) const OVERRIDE;
41 41
42 private: 42 private:
(...skipping 17 matching lines...) Expand all
60 bool allow_undefined_; 60 bool allow_undefined_;
61 61
62 // If true, we will convert Date JavaScript objects to doubles. 62 // If true, we will convert Date JavaScript objects to doubles.
63 bool allow_date_; 63 bool allow_date_;
64 64
65 // If true, we will convet RegExp JavaScript objects to string. 65 // If true, we will convet RegExp JavaScript objects to string.
66 bool allow_regexp_; 66 bool allow_regexp_;
67 }; 67 };
68 68
69 #endif // CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ 69 #endif // CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698