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

Side by Side Diff: content/renderer/java/gin_java_bridge_value_converter.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/renderer/java/gin_java_bridge_value_converter.h" 5 #include "content/renderer/java/gin_java_bridge_value_converter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 DISALLOW_COPY_AND_ASSIGN(TypedArraySerializerImpl); 99 DISALLOW_COPY_AND_ASSIGN(TypedArraySerializerImpl);
100 }; 100 };
101 101
102 // static 102 // static
103 scoped_ptr<TypedArraySerializer> TypedArraySerializer::Create( 103 scoped_ptr<TypedArraySerializer> TypedArraySerializer::Create(
104 v8::Local<v8::TypedArray> typed_array) { 104 v8::Local<v8::TypedArray> typed_array) {
105 if (typed_array->IsInt8Array() || 105 if (typed_array->IsInt8Array() ||
106 typed_array->IsUint8Array() || 106 typed_array->IsUint8Array() ||
107 typed_array->IsUint8ClampedArray()) { 107 typed_array->IsUint8ClampedArray()) {
108 return TypedArraySerializerImpl<char, int>::Create(typed_array).Pass(); 108 return TypedArraySerializerImpl<char, int>::Create(typed_array);
109 } else if (typed_array->IsInt16Array() || typed_array->IsUint16Array()) { 109 } else if (typed_array->IsInt16Array() || typed_array->IsUint16Array()) {
110 return TypedArraySerializerImpl<int16_t, int>::Create(typed_array).Pass(); 110 return TypedArraySerializerImpl<int16_t, int>::Create(typed_array);
111 } else if (typed_array->IsInt32Array() || typed_array->IsUint32Array()) { 111 } else if (typed_array->IsInt32Array() || typed_array->IsUint32Array()) {
112 return TypedArraySerializerImpl<int32_t, int>::Create(typed_array).Pass(); 112 return TypedArraySerializerImpl<int32_t, int>::Create(typed_array);
113 } else if (typed_array->IsFloat32Array()) { 113 } else if (typed_array->IsFloat32Array()) {
114 return TypedArraySerializerImpl<float, double>::Create(typed_array).Pass(); 114 return TypedArraySerializerImpl<float, double>::Create(typed_array);
115 } else if (typed_array->IsFloat64Array()) { 115 } else if (typed_array->IsFloat64Array()) {
116 return TypedArraySerializerImpl<double, double>::Create(typed_array).Pass(); 116 return TypedArraySerializerImpl<double, double>::Create(typed_array);
117 } 117 }
118 NOTREACHED(); 118 NOTREACHED();
119 return scoped_ptr<TypedArraySerializer>(); 119 return scoped_ptr<TypedArraySerializer>();
120 } 120 }
121 121
122 } // namespace 122 } // namespace
123 123
124 bool GinJavaBridgeValueConverter::FromV8ArrayBuffer( 124 bool GinJavaBridgeValueConverter::FromV8ArrayBuffer(
125 v8::Local<v8::Object> value, 125 v8::Local<v8::Object> value,
126 base::Value** out, 126 base::Value** out,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 *out = GinJavaBridgeValue::CreateNonFiniteValue(double_value).release(); 158 *out = GinJavaBridgeValue::CreateNonFiniteValue(double_value).release();
159 return true; 159 return true;
160 } 160 }
161 161
162 bool GinJavaBridgeValueConverter::FromV8Undefined(base::Value** out) const { 162 bool GinJavaBridgeValueConverter::FromV8Undefined(base::Value** out) const {
163 *out = GinJavaBridgeValue::CreateUndefinedValue().release(); 163 *out = GinJavaBridgeValue::CreateUndefinedValue().release();
164 return true; 164 return true;
165 } 165 }
166 166
167 } // namespace content 167 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_synchronous_compositor_android.cc ('k') | content/renderer/media/android/media_info_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698