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

Side by Side Diff: content/common/android/gin_java_bridge_value.cc

Issue 1552733002: Convert Pass()→std::move() in //content (Android edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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 #include "content/common/android/gin_java_bridge_value.h" 5 #include "content/common/android/gin_java_bridge_value.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 24 matching lines...) Expand all
35 scoped_ptr<base::BinaryValue> GinJavaBridgeValue::CreateNonFiniteValue( 35 scoped_ptr<base::BinaryValue> GinJavaBridgeValue::CreateNonFiniteValue(
36 float in_value) { 36 float in_value) {
37 GinJavaBridgeValue gin_value(TYPE_NONFINITE); 37 GinJavaBridgeValue gin_value(TYPE_NONFINITE);
38 gin_value.pickle_.WriteFloat(in_value); 38 gin_value.pickle_.WriteFloat(in_value);
39 return make_scoped_ptr(gin_value.SerializeToBinaryValue()); 39 return make_scoped_ptr(gin_value.SerializeToBinaryValue());
40 } 40 }
41 41
42 // static 42 // static
43 scoped_ptr<base::BinaryValue> GinJavaBridgeValue::CreateNonFiniteValue( 43 scoped_ptr<base::BinaryValue> GinJavaBridgeValue::CreateNonFiniteValue(
44 double in_value) { 44 double in_value) {
45 return CreateNonFiniteValue(static_cast<float>(in_value)).Pass(); 45 return CreateNonFiniteValue(static_cast<float>(in_value));
46 } 46 }
47 47
48 // static 48 // static
49 scoped_ptr<base::BinaryValue> GinJavaBridgeValue::CreateObjectIDValue( 49 scoped_ptr<base::BinaryValue> GinJavaBridgeValue::CreateObjectIDValue(
50 int32_t in_value) { 50 int32_t in_value) {
51 GinJavaBridgeValue gin_value(TYPE_OBJECT_ID); 51 GinJavaBridgeValue gin_value(TYPE_OBJECT_ID);
52 gin_value.pickle_.WriteInt(in_value); 52 gin_value.pickle_.WriteInt(in_value);
53 return make_scoped_ptr(gin_value.SerializeToBinaryValue()); 53 return make_scoped_ptr(gin_value.SerializeToBinaryValue());
54 } 54 }
55 55
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 : pickle_(value->GetBuffer(), value->GetSize()) { 119 : pickle_(value->GetBuffer(), value->GetSize()) {
120 DCHECK(ContainsGinJavaBridgeValue(value)); 120 DCHECK(ContainsGinJavaBridgeValue(value));
121 } 121 }
122 122
123 base::BinaryValue* GinJavaBridgeValue::SerializeToBinaryValue() { 123 base::BinaryValue* GinJavaBridgeValue::SerializeToBinaryValue() {
124 return base::BinaryValue::CreateWithCopiedBuffer( 124 return base::BinaryValue::CreateWithCopiedBuffer(
125 reinterpret_cast<const char*>(pickle_.data()), pickle_.size()); 125 reinterpret_cast<const char*>(pickle_.data()), pickle_.size());
126 } 126 }
127 127
128 } // namespace content 128 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/vr/vr_device_manager.cc ('k') | content/public/test/test_synchronous_compositor_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698