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

Unified Diff: cc/ipc/surface_id_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_id_struct_traits.h
diff --git a/cc/ipc/surface_id_struct_traits.h b/cc/ipc/surface_id_struct_traits.h
index 97280cce9f59f97eb89567d68145703505cf4f59..bafadf9cdfde7d7e4630e0bee410e40cb78a3807 100644
--- a/cc/ipc/surface_id_struct_traits.h
+++ b/cc/ipc/surface_id_struct_traits.h
@@ -5,13 +5,15 @@
#ifndef CC_IPC_SURFACE_ID_STRUCT_TRAITS_H_
#define CC_IPC_SURFACE_ID_STRUCT_TRAITS_H_
-#include "cc/ipc/surface_id.mojom.h"
#include "cc/surfaces/surface_id.h"
namespace mojo {
-template <>
-struct StructTraits<cc::mojom::SurfaceId, cc::SurfaceId> {
+// This template is fully specialized as cc::mojom::SurfaceId and
+// as cc::mojom::blink::SurfaceId, in generated .mojom.h and .mojom-blink.h
+// respectively.
+template <typename T>
+struct StructTraits<T, cc::SurfaceId> {
static uint32_t id_namespace(const cc::SurfaceId& id) {
return id.id_namespace();
}
@@ -20,7 +22,7 @@ struct StructTraits<cc::mojom::SurfaceId, cc::SurfaceId> {
static uint64_t nonce(const cc::SurfaceId& id) { return id.nonce(); }
- static bool Read(cc::mojom::SurfaceIdDataView data, cc::SurfaceId* out) {
+ static bool Read(typename T::DataView data, cc::SurfaceId* out) {
*out = cc::SurfaceId(data.id_namespace(), data.local_id(), data.nonce());
return true;
}

Powered by Google App Engine
This is Rietveld 408576698