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

Side by Side Diff: services/ui/public/interfaces/cursor/cursor_struct_traits.h

Issue 2786983003: [aura-mus] Add ui::CursorData, with mojo serialization. (Closed)
Patch Set: Enhance the test and comment mojom. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_UI_PUBLIC_INTERFACES_CURSOR_CURSOR_STRUCT_TRAITS_H_
6 #define SERVICES_UI_PUBLIC_INTERFACES_CURSOR_CURSOR_STRUCT_TRAITS_H_
7
8 #include "services/ui/public/interfaces/cursor/cursor.mojom-shared.h"
9 #include "ui/base/cursor/cursor_data.h"
10
11 namespace mojo {
12
13 template <>
14 struct StructTraits<ui::mojom::CursorDataDataView, ui::CursorData> {
15 static ui::mojom::CursorType native_type(const ui::CursorData& c) {
16 return ui::mojom::CursorType(c.native_type());
17 }
18 static uint32_t frame_delay_ms(const ui::CursorData& c) {
19 return c.frame_delay_ms();
20 }
21 static gfx::Point hotspot(const ui::CursorData& c) { return c.hotspot(); }
22 static const std::vector<SkBitmap>& cursor_frames(const ui::CursorData& c);
23 static bool Read(ui::mojom::CursorDataDataView data, ui::CursorData* out);
24 };
25
26 } // namespace mojo
27
28 #endif // SERVICES_UI_PUBLIC_INTERFACES_CURSOR_CURSOR_STRUCT_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698