aboutsummaryrefslogtreecommitdiff
path: root/ui/gfx/range/mojo/range_struct_traits.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gfx/range/mojo/range_struct_traits.h')
-rw-r--r--ui/gfx/range/mojo/range_struct_traits.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/ui/gfx/range/mojo/range_struct_traits.h b/ui/gfx/range/mojo/range_struct_traits.h
deleted file mode 100644
index e717d41..0000000
--- a/ui/gfx/range/mojo/range_struct_traits.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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.
-
-#ifndef UI_GFX_RANGE_MOJO_RANGE_STRUCT_TRAITS_H_
-#define UI_GFX_RANGE_MOJO_RANGE_STRUCT_TRAITS_H_
-
-#include "ui/gfx/range/mojo/range.mojom-shared.h"
-#include "ui/gfx/range/range.h"
-#include "ui/gfx/range/range_f.h"
-
-namespace mojo {
-
-template <>
-struct StructTraits<gfx::mojom::RangeDataView, gfx::Range> {
- static uint32_t start(const gfx::Range& r) { return r.start(); }
- static uint32_t end(const gfx::Range& r) { return r.end(); }
- static bool Read(gfx::mojom::RangeDataView data, gfx::Range* out) {
- out->set_start(data.start());
- out->set_end(data.end());
- return true;
- }
-};
-
-template <>
-struct StructTraits<gfx::mojom::RangeFDataView, gfx::RangeF> {
- static float start(const gfx::RangeF& r) { return r.start(); }
- static float end(const gfx::RangeF& r) { return r.end(); }
- static bool Read(gfx::mojom::RangeFDataView data, gfx::RangeF* out) {
- out->set_start(data.start());
- out->set_end(data.end());
- return true;
- }
-};
-
-} // namespace mojo
-
-#endif // UI_GFX_RANGE_MOJO_RANGE_STRUCT_TRAITS_H_