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

Side by Side Diff: ui/gfx/mojo/accelerated_widget_struct_traits.h

Issue 2253293002: Mojo C++ bindings: change the first template parameter of StructTraits and UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@91_extra
Patch Set: rebase Created 4 years, 3 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_MOJO_ACCELERATED_WIDGET_STRUCT_TRAITS_H_ 5 #ifndef UI_GFX_MOJO_ACCELERATED_WIDGET_STRUCT_TRAITS_H_
6 #define UI_GFX_MOJO_ACCELERATED_WIDGET_STRUCT_TRAITS_H_ 6 #define UI_GFX_MOJO_ACCELERATED_WIDGET_STRUCT_TRAITS_H_
7 7
8 #include "ui/gfx/mojo/accelerated_widget.mojom.h" 8 #include "ui/gfx/mojo/accelerated_widget.mojom.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 12
13 template <> 13 template <>
14 struct StructTraits<gfx::mojom::AcceleratedWidget, gfx::AcceleratedWidget> { 14 struct StructTraits<gfx::mojom::AcceleratedWidgetDataView,
15 gfx::AcceleratedWidget> {
15 static uint64_t widget(const gfx::AcceleratedWidget& widget) { 16 static uint64_t widget(const gfx::AcceleratedWidget& widget) {
16 #if defined(OS_WIN) || defined(USE_OZONE) || defined(USE_X11) 17 #if defined(OS_WIN) || defined(USE_OZONE) || defined(USE_X11)
17 #if defined(OS_WIN) 18 #if defined(OS_WIN)
18 return reinterpret_cast<uint64_t>(widget); 19 return reinterpret_cast<uint64_t>(widget);
19 #else 20 #else
20 return static_cast<uint64_t>(widget); 21 return static_cast<uint64_t>(widget);
21 #endif 22 #endif
22 #else 23 #else
23 NOTIMPLEMENTED(); 24 NOTIMPLEMENTED();
24 return 0; 25 return 0;
(...skipping 13 matching lines...) Expand all
38 NOTIMPLEMENTED(); 39 NOTIMPLEMENTED();
39 *out = 0; 40 *out = 0;
40 #endif 41 #endif
41 return true; 42 return true;
42 } 43 }
43 }; 44 };
44 45
45 } // namespace mojo 46 } // namespace mojo
46 47
47 #endif // UI_GFX_MOJO_ACCELERATED_WIDGET_STRUCT_TRAITS_H_ 48 #endif // UI_GFX_MOJO_ACCELERATED_WIDGET_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « ui/gfx/geometry/mojo/geometry_struct_traits.h ('k') | ui/gfx/mojo/selection_bound_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698