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

Side by Side Diff: content/public/renderer/v8_value_converter.h

Issue 8540012: Enable extension APIs for content scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PUBLIC_RENDERER_V8_VALUE_CONVERTER_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_V8_VALUE_CONVERTER_H_
6 #define CONTENT_PUBLIC_RENDERER_V8_VALUE_CONVERTER_H_ 6 #define CONTENT_PUBLIC_RENDERER_V8_VALUE_CONVERTER_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "v8/include/v8.h" 9 #include "v8/include/v8.h"
10 10
(...skipping 12 matching lines...) Expand all
23 class CONTENT_EXPORT V8ValueConverter { 23 class CONTENT_EXPORT V8ValueConverter {
24 public: 24 public:
25 static V8ValueConverter* create(); 25 static V8ValueConverter* create();
26 26
27 virtual ~V8ValueConverter() {} 27 virtual ~V8ValueConverter() {}
28 28
29 // Converts Value to v8::Value. Unsupported types are replaced with null. 29 // Converts Value to v8::Value. Unsupported types are replaced with null.
30 // If an array or object throws while setting a value, that property or item 30 // If an array or object throws while setting a value, that property or item
31 // is skipped, leaving a hole in the case of arrays. 31 // is skipped, leaving a hole in the case of arrays.
32 virtual v8::Handle<v8::Value> ToV8Value( 32 virtual v8::Handle<v8::Value> ToV8Value(
33 base::Value* value, 33 const base::Value* value,
34 v8::Handle<v8::Context> context) const = 0; 34 v8::Handle<v8::Context> context) const = 0;
35 35
36 // Converts v8::Value to Value. Unsupported types are replaced with null. 36 // Converts v8::Value to Value. Unsupported types are replaced with null.
37 // If an array or object throws while getting a value, that property or item 37 // If an array or object throws while getting a value, that property or item
38 // is replaced with null. 38 // is replaced with null.
39 virtual base::Value* FromV8Value(v8::Handle<v8::Value> value, 39 virtual base::Value* FromV8Value(v8::Handle<v8::Value> value,
40 v8::Handle<v8::Context> context) const = 0; 40 v8::Handle<v8::Context> context) const = 0;
41 }; 41 };
42 42
43 } // namespace content 43 } // namespace content
44 44
45 #endif // CONTENT_PUBLIC_RENDERER_V8_VALUE_CONVERTER_H_ 45 #endif // CONTENT_PUBLIC_RENDERER_V8_VALUE_CONVERTER_H_
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/stubs/content_script.js ('k') | content/renderer/v8_value_converter_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698