| OLD | NEW |
| 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 <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 class CONTENT_EXPORT V8ValueConverterImpl : public V8ValueConverter { | 24 class CONTENT_EXPORT V8ValueConverterImpl : public V8ValueConverter { |
| 25 public: | 25 public: |
| 26 V8ValueConverterImpl(); | 26 V8ValueConverterImpl(); |
| 27 | 27 |
| 28 // V8ValueConverter implementation. | 28 // V8ValueConverter implementation. |
| 29 virtual void SetDateAllowed(bool val) OVERRIDE; | 29 virtual void SetDateAllowed(bool val) OVERRIDE; |
| 30 virtual void SetRegExpAllowed(bool val) OVERRIDE; | 30 virtual void SetRegExpAllowed(bool val) OVERRIDE; |
| 31 virtual void SetFunctionAllowed(bool val) OVERRIDE; | 31 virtual void SetFunctionAllowed(bool val) OVERRIDE; |
| 32 virtual void SetStripNullFromObjects(bool val) OVERRIDE; | 32 virtual void SetStripNullFromObjects(bool val) OVERRIDE; |
| 33 virtual void SetStrategy(Strategy* strategy) OVERRIDE; |
| 33 virtual v8::Handle<v8::Value> ToV8Value( | 34 virtual v8::Handle<v8::Value> ToV8Value( |
| 34 const base::Value* value, | 35 const base::Value* value, |
| 35 v8::Handle<v8::Context> context) const OVERRIDE; | 36 v8::Handle<v8::Context> context) const OVERRIDE; |
| 36 virtual base::Value* FromV8Value( | 37 virtual base::Value* FromV8Value( |
| 37 v8::Handle<v8::Value> value, | 38 v8::Handle<v8::Value> value, |
| 38 v8::Handle<v8::Context> context) const OVERRIDE; | 39 v8::Handle<v8::Context> context) const OVERRIDE; |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 friend class ScopedAvoidIdentityHashForTesting; | 42 friend class ScopedAvoidIdentityHashForTesting; |
| 42 | 43 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 69 | 70 |
| 70 // If true, we will convert Function JavaScript objects to dictionaries. | 71 // If true, we will convert Function JavaScript objects to dictionaries. |
| 71 bool function_allowed_; | 72 bool function_allowed_; |
| 72 | 73 |
| 73 // If true, undefined and null values are ignored when converting v8 objects | 74 // If true, undefined and null values are ignored when converting v8 objects |
| 74 // into Values. | 75 // into Values. |
| 75 bool strip_null_from_objects_; | 76 bool strip_null_from_objects_; |
| 76 | 77 |
| 77 bool avoid_identity_hash_for_testing_; | 78 bool avoid_identity_hash_for_testing_; |
| 78 | 79 |
| 80 // Strategy object that changes the converter's behavior. |
| 81 Strategy* strategy_; |
| 82 |
| 79 DISALLOW_COPY_AND_ASSIGN(V8ValueConverterImpl); | 83 DISALLOW_COPY_AND_ASSIGN(V8ValueConverterImpl); |
| 80 }; | 84 }; |
| 81 | 85 |
| 82 } // namespace content | 86 } // namespace content |
| 83 | 87 |
| 84 #endif // CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ | 88 #endif // CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ |
| OLD | NEW |