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

Side by Side Diff: content/renderer/java/gin_java_bridge_value_converter.h

Issue 259033002: [Android] Implement renderer side of Gin Java Bridge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, conflicts resolved Created 6 years, 6 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_
6 #define CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "content/common/content_export.h"
10 #include "content/public/renderer/v8_value_converter.h"
11
12 namespace content {
13
14 class GinJavaBridgeValueConverter : public content::V8ValueConverter::Strategy {
15 public:
16 CONTENT_EXPORT GinJavaBridgeValueConverter();
17 CONTENT_EXPORT virtual ~GinJavaBridgeValueConverter();
18
19 CONTENT_EXPORT v8::Handle<v8::Value> ToV8Value(
20 const base::Value* value,
21 v8::Handle<v8::Context> context) const;
22 CONTENT_EXPORT scoped_ptr<base::Value> FromV8Value(
23 v8::Handle<v8::Value> value,
24 v8::Handle<v8::Context> context) const;
25
26 // content::V8ValueConverter::Strategy
27 virtual bool FromV8Object(v8::Handle<v8::Object> value,
28 base::Value** out,
29 v8::Isolate* isolate,
30 const FromV8ValueCallback& callback) const OVERRIDE;
31 virtual bool FromV8ArrayBuffer(v8::Handle<v8::Object> value,
32 base::Value** out,
33 v8::Isolate* isolate) const OVERRIDE;
34 virtual bool FromV8Number(v8::Handle<v8::Number> value,
35 base::Value** out) const OVERRIDE;
36 virtual bool FromV8Undefined(base::Value** out) const OVERRIDE;
37
38 private:
39 scoped_ptr<V8ValueConverter> converter_;
40
41 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeValueConverter);
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_
OLDNEW
« no previous file with comments | « content/renderer/java/gin_java_bridge_object.cc ('k') | content/renderer/java/gin_java_bridge_value_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698