OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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_STATUS_STRUCT_TRAITS_H_ | 5 #ifndef COMPONENTS_MEDIA_ROUTER_MOJO_MEDIA_STATUS_STRUCT_TRAITS_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_STATUS_STRUCT_TRAITS_H_ | 6 #define COMPONENTS_MEDIA_ROUTER_MOJO_MEDIA_STATUS_STRUCT_TRAITS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/media/router/media_status.h" | 10 #include "components/media_router/media_status.h" |
11 #include "chrome/browser/media/router/mojo/media_status.mojom.h" | 11 #include "components/media_router/mojo/media_status.mojom.h" |
12 #include "mojo/common/common_custom_types_struct_traits.h" | 12 #include "mojo/common/common_custom_types_struct_traits.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 | 15 |
16 // MediaStatus | 16 // MediaStatus |
17 | 17 |
18 template <> | 18 template <> |
19 struct StructTraits<media_router::mojom::MediaStatusDataView, | 19 struct StructTraits<media_router::mojom::MediaStatusDataView, |
20 media_router::MediaStatus> { | 20 media_router::MediaStatus> { |
21 static bool Read(media_router::mojom::MediaStatusDataView data, | 21 static bool Read(media_router::mojom::MediaStatusDataView data, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return status.duration; | 62 return status.duration; |
63 } | 63 } |
64 | 64 |
65 static base::TimeDelta current_time(const media_router::MediaStatus& status) { | 65 static base::TimeDelta current_time(const media_router::MediaStatus& status) { |
66 return status.current_time; | 66 return status.current_time; |
67 } | 67 } |
68 }; | 68 }; |
69 | 69 |
70 } // namespace mojo | 70 } // namespace mojo |
71 | 71 |
72 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_STATUS_STRUCT_TRAITS_H_ | 72 #endif // COMPONENTS_MEDIA_ROUTER_MOJO_MEDIA_STATUS_STRUCT_TRAITS_H_ |
OLD | NEW |