OLD | NEW |
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 CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/media/router/mojo/media_router.mojom.h" | 10 #include "chrome/browser/media/router/mojo/media_router.mojom.h" |
| 11 #include "mojo/common/common_custom_types_struct_traits.h" |
11 | 12 |
12 namespace mojo { | 13 namespace mojo { |
13 | 14 |
14 template <> | 15 template <> |
15 struct StructTraits<media_router::mojom::RouteMessageDataView, | 16 struct StructTraits<media_router::mojom::RouteMessageDataView, |
16 media_router::RouteMessage> { | 17 media_router::RouteMessage> { |
17 static media_router::mojom::RouteMessage::Type type( | 18 static media_router::mojom::RouteMessage::Type type( |
18 const media_router::RouteMessage& msg) { | 19 const media_router::RouteMessage& msg) { |
19 switch (msg.type) { | 20 switch (msg.type) { |
20 case media_router::RouteMessage::TEXT: | 21 case media_router::RouteMessage::TEXT: |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 default: | 62 default: |
62 return false; | 63 return false; |
63 } | 64 } |
64 return true; | 65 return true; |
65 } | 66 } |
66 }; | 67 }; |
67 | 68 |
68 } // namespace mojo | 69 } // namespace mojo |
69 | 70 |
70 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_ | 71 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_STRUCT_TRAITS_H_ |
OLD | NEW |