| 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" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/public/renderer/v8_value_converter.h" | 13 #include "content/public/renderer/v8_value_converter.h" |
| 14 | 14 |
| 15 namespace base { | 15 namespace base { |
| 16 class BinaryValue; | 16 class BinaryValue; |
| 17 class DictionaryValue; | 17 class DictionaryValue; |
| 18 class ListValue; | 18 class ListValue; |
| 19 class Value; | 19 class Value; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 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 void SetStrategy(Strategy* strategy) override; |
| 34 virtual v8::Handle<v8::Value> ToV8Value( | 34 virtual v8::Handle<v8::Value> ToV8Value( |
| 35 const base::Value* value, | 35 const base::Value* value, |
| 36 v8::Handle<v8::Context> context) const OVERRIDE; | 36 v8::Handle<v8::Context> context) const override; |
| 37 virtual base::Value* FromV8Value( | 37 virtual base::Value* FromV8Value( |
| 38 v8::Handle<v8::Value> value, | 38 v8::Handle<v8::Value> value, |
| 39 v8::Handle<v8::Context> context) const OVERRIDE; | 39 v8::Handle<v8::Context> context) const override; |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 friend class ScopedAvoidIdentityHashForTesting; | 42 friend class ScopedAvoidIdentityHashForTesting; |
| 43 | 43 |
| 44 class FromV8ValueState; | 44 class FromV8ValueState; |
| 45 | 45 |
| 46 v8::Local<v8::Value> ToV8ValueImpl(v8::Isolate* isolate, | 46 v8::Local<v8::Value> ToV8ValueImpl(v8::Isolate* isolate, |
| 47 v8::Handle<v8::Object> creation_context, | 47 v8::Handle<v8::Object> creation_context, |
| 48 const base::Value* value) const; | 48 const base::Value* value) const; |
| 49 v8::Handle<v8::Value> ToV8Array(v8::Isolate* isolate, | 49 v8::Handle<v8::Value> ToV8Array(v8::Isolate* isolate, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 // Strategy object that changes the converter's behavior. | 91 // Strategy object that changes the converter's behavior. |
| 92 Strategy* strategy_; | 92 Strategy* strategy_; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(V8ValueConverterImpl); | 94 DISALLOW_COPY_AND_ASSIGN(V8ValueConverterImpl); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace content | 97 } // namespace content |
| 98 | 98 |
| 99 #endif // CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ | 99 #endif // CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ |
| OLD | NEW |