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

Unified Diff: cc/ipc/surface_sequence_struct_traits.h

Issue 2036663003: Establish mojo service between Canvas (blink) and SurfaceManager (browser) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: OWNERS change on offscreencanvas folder Created 4 years, 6 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
Index: cc/ipc/surface_sequence_struct_traits.h
diff --git a/cc/ipc/surface_sequence_struct_traits.h b/cc/ipc/surface_sequence_struct_traits.h
index 18fb841bc319fd71d0e03e5548f9a857af22aa1e..2635b4df1bdf9724fba03094ea6c0f59dc4c1bf4 100644
--- a/cc/ipc/surface_sequence_struct_traits.h
+++ b/cc/ipc/surface_sequence_struct_traits.h
@@ -5,13 +5,15 @@
#ifndef CC_IPC_SURFACE_SEQUENCE_STRUCT_TRAITS_H_
#define CC_IPC_SURFACE_SEQUENCE_STRUCT_TRAITS_H_
-#include "cc/ipc/surface_sequence.mojom.h"
#include "cc/surfaces/surface_sequence.h"
namespace mojo {
-template <>
-struct StructTraits<cc::mojom::SurfaceSequence, cc::SurfaceSequence> {
+// This template is fully specialized as cc::mojom::SurfaceSequence and
+// as cc::mojom::blink::SurfaceSequence, in generated .mojom.h and
+// .mojom-blink.h respectively.
+template <typename T>
+struct StructTraits<T, cc::SurfaceSequence> {
static uint32_t id_namespace(const cc::SurfaceSequence& id) {
return id.id_namespace;
}
@@ -20,8 +22,7 @@ struct StructTraits<cc::mojom::SurfaceSequence, cc::SurfaceSequence> {
return id.sequence;
}
- static bool Read(cc::mojom::SurfaceSequenceDataView data,
- cc::SurfaceSequence* out) {
+ static bool Read(typename T::DataView data, cc::SurfaceSequence* out) {
*out = cc::SurfaceSequence(data.id_namespace(), data.sequence());
return true;
}

Powered by Google App Engine
This is Rietveld 408576698