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

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: Throw away typemaps in Blink 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..762b67a4c851d9b991cd1478cad9a44030814254 100644
--- a/cc/ipc/surface_id_struct_traits.h
+++ b/cc/ipc/surface_id_struct_traits.h
@@ -5,13 +5,12 @@
#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> {
+template <typename T>
danakj 2016/06/13 20:02:46 Do you still need these then? What are the types t
xlai (Olivia) 2016/06/13 20:20:14 Yes, I need this partial template specialization.
danakj 2016/06/13 20:24:19 Ah ok thanks. Can you leave a comment about these
xlai (Olivia) 2016/06/14 21:10:17 Done.
+struct StructTraits<T, cc::SurfaceId> {
static uint32_t id_namespace(const cc::SurfaceId& id) {
return id.id_namespace();
}
@@ -20,7 +19,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