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

Unified Diff: content/common/video_capture_struct_traits.cc

Issue 2395163002: VideoCapture: migrate VideoCapture renderer-->host messages to mojo, part 2 (Closed)
Patch Set: rockot@s comments on renaming and return types Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/video_capture_struct_traits.h ('k') | content/renderer/media/video_capture_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/video_capture_struct_traits.cc
diff --git a/content/common/video_capture_struct_traits.cc b/content/common/video_capture_struct_traits.cc
new file mode 100644
index 0000000000000000000000000000000000000000..19f629db0f028c712a96f092e2e8f7ab64103add
--- /dev/null
+++ b/content/common/video_capture_struct_traits.cc
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/common/video_capture_struct_traits.h"
+
+#include "services/video_capture/public/interfaces/video_capture_device_proxy_traits.h"
+#include "services/video_capture/public/interfaces/video_capture_format_traits.h"
+
+namespace mojo {
+
+// static
+bool StructTraits<content::mojom::VideoCaptureParamsDataView,
+ media::VideoCaptureParams>::
+ Read(content::mojom::VideoCaptureParamsDataView data,
+ media::VideoCaptureParams* out) {
+ if (!data.ReadRequestedFormat(&out->requested_format))
+ return false;
+ if (!data.ReadResolutionChangePolicy(&out->resolution_change_policy))
+ return false;
+ if (!data.ReadPowerLineFrequency(&out->power_line_frequency))
+ return false;
+ return true;
+}
+
+} // namespace mojo
« no previous file with comments | « content/common/video_capture_struct_traits.h ('k') | content/renderer/media/video_capture_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698