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

Unified Diff: third_party/WebKit/Source/modules/vr/VRPose.cpp

Issue 2494983003: Mojo C++ bindings: switch device/vr mojom target to use STL/WTF types. (Closed)
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/vr/VRPose.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRPose.cpp b/third_party/WebKit/Source/modules/vr/VRPose.cpp
index 3775522ddad665fc97f4a7fc1d52d8b3e7cfca48..8007fc5cc4c9778d1406c5e3dd0787df620b5870 100644
--- a/third_party/WebKit/Source/modules/vr/VRPose.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRPose.cpp
@@ -8,11 +8,12 @@ namespace blink {
namespace {
-DOMFloat32Array* mojoArrayToFloat32Array(const mojo::WTFArray<float>& vec) {
- if (vec.is_null())
+DOMFloat32Array* mojoArrayToFloat32Array(
+ const WTF::Optional<WTF::Vector<float>>& vec) {
+ if (!vec)
return nullptr;
- return DOMFloat32Array::create(&(vec.front()), vec.size());
+ return DOMFloat32Array::create(&(vec.value().first()), vec.value().size());
}
} // namespace
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRFrameData.cpp ('k') | third_party/WebKit/Source/modules/vr/VRStageParameters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698