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

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

Issue 1873783003: Convert //content/renderer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_ 5 #ifndef CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_
6 #define CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_ 6 #define CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
11 #include "content/public/child/v8_value_converter.h" 12 #include "content/public/child/v8_value_converter.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 class GinJavaBridgeValueConverter : public content::V8ValueConverter::Strategy { 16 class GinJavaBridgeValueConverter : public content::V8ValueConverter::Strategy {
16 public: 17 public:
17 CONTENT_EXPORT GinJavaBridgeValueConverter(); 18 CONTENT_EXPORT GinJavaBridgeValueConverter();
18 CONTENT_EXPORT ~GinJavaBridgeValueConverter() override; 19 CONTENT_EXPORT ~GinJavaBridgeValueConverter() override;
19 20
20 CONTENT_EXPORT v8::Local<v8::Value> ToV8Value( 21 CONTENT_EXPORT v8::Local<v8::Value> ToV8Value(
21 const base::Value* value, 22 const base::Value* value,
22 v8::Local<v8::Context> context) const; 23 v8::Local<v8::Context> context) const;
23 CONTENT_EXPORT scoped_ptr<base::Value> FromV8Value( 24 CONTENT_EXPORT std::unique_ptr<base::Value> FromV8Value(
24 v8::Local<v8::Value> value, 25 v8::Local<v8::Value> value,
25 v8::Local<v8::Context> context) const; 26 v8::Local<v8::Context> context) const;
26 27
27 // content::V8ValueConverter::Strategy 28 // content::V8ValueConverter::Strategy
28 bool FromV8Object(v8::Local<v8::Object> value, 29 bool FromV8Object(v8::Local<v8::Object> value,
29 base::Value** out, 30 base::Value** out,
30 v8::Isolate* isolate, 31 v8::Isolate* isolate,
31 const FromV8ValueCallback& callback) const override; 32 const FromV8ValueCallback& callback) const override;
32 bool FromV8ArrayBuffer(v8::Local<v8::Object> value, 33 bool FromV8ArrayBuffer(v8::Local<v8::Object> value,
33 base::Value** out, 34 base::Value** out,
34 v8::Isolate* isolate) const override; 35 v8::Isolate* isolate) const override;
35 bool FromV8Number(v8::Local<v8::Number> value, 36 bool FromV8Number(v8::Local<v8::Number> value,
36 base::Value** out) const override; 37 base::Value** out) const override;
37 bool FromV8Undefined(base::Value** out) const override; 38 bool FromV8Undefined(base::Value** out) const override;
38 39
39 private: 40 private:
40 scoped_ptr<V8ValueConverter> converter_; 41 std::unique_ptr<V8ValueConverter> converter_;
41 42
42 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeValueConverter); 43 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeValueConverter);
43 }; 44 };
44 45
45 } // namespace content 46 } // namespace content
46 47
47 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_ 48 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_VALUE_CONVERTER_H_
OLDNEW
« no previous file with comments | « content/renderer/java/gin_java_bridge_dispatcher.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