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

Unified Diff: mojo/public/cpp/bindings/tests/rect_blink.h

Issue 1821073002: Mojo bindings: Fix typemap includes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: mojo/public/cpp/bindings/tests/rect_blink.h
diff --git a/mojo/public/cpp/bindings/tests/rect_blink.h b/mojo/public/cpp/bindings/tests/rect_blink.h
index b246847ee2feb0401015dcdc09e7715bd7fe812b..de7a7922a589d3ee2eb21aed0b557e75170b7f74 100644
--- a/mojo/public/cpp/bindings/tests/rect_blink.h
+++ b/mojo/public/cpp/bindings/tests/rect_blink.h
@@ -6,7 +6,6 @@
#define MOJO_PUBLIC_CPP_BINDINGS_TESTS_RECT_BLINK_H_
#include "base/logging.h"
-#include "mojo/public/interfaces/bindings/tests/rect.mojom.h"
namespace mojo {
namespace test {
@@ -60,26 +59,6 @@ class RectBlink {
};
} // namespace test
-
-template <>
-struct StructTraits<test::Rect, test::RectBlink> {
- static int x(const test::RectBlink& r) { return r.x(); }
- static int y(const test::RectBlink& r) { return r.y(); }
- static int width(const test::RectBlink& r) { return r.width(); }
- static int height(const test::RectBlink& r) { return r.height(); }
-
- static bool Read(test::Rect::Reader r, test::RectBlink* out) {
- if (r.x() < 0 || r.y() < 0 || r.width() < 0 || r.height() < 0) {
- return false;
- }
- out->setX(r.x());
- out->setY(r.y());
- out->setWidth(r.width());
- out->setHeight(r.height());
- return true;
- }
-};
-
} // namespace mojo
#endif // MOJO_PUBLIC_CPP_BINDINGS_TESTS_RECT_BLINK_H_

Powered by Google App Engine
This is Rietveld 408576698