| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_BROWSER_PRESENTATION_PRESENTATION_TYPE_CONVERTERS_H_ | 5 #ifndef CONTENT_BROWSER_PRESENTATION_PRESENTATION_TYPE_CONVERTERS_H_ |
| 6 #define CONTENT_BROWSER_PRESENTATION_PRESENTATION_TYPE_CONVERTERS_H_ | 6 #define CONTENT_BROWSER_PRESENTATION_PRESENTATION_TYPE_CONVERTERS_H_ |
| 7 | 7 |
| 8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 #include "content/public/browser/presentation_session.h" | 9 #include "content/public/browser/presentation_session.h" |
| 10 #include "third_party/WebKit/public/platform/modules/presentation/presentation.m
ojom.h" | 10 #include "third_party/WebKit/public/platform/modules/presentation/presentation.m
ojom.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 template <> | 27 template <> |
| 28 struct TypeConverter<blink::mojom::PresentationSessionInfoPtr, | 28 struct TypeConverter<blink::mojom::PresentationSessionInfoPtr, |
| 29 content::PresentationSessionInfo> { | 29 content::PresentationSessionInfo> { |
| 30 static blink::mojom::PresentationSessionInfoPtr Convert( | 30 static blink::mojom::PresentationSessionInfoPtr Convert( |
| 31 const content::PresentationSessionInfo& input) { | 31 const content::PresentationSessionInfo& input) { |
| 32 blink::mojom::PresentationSessionInfoPtr output( | 32 blink::mojom::PresentationSessionInfoPtr output( |
| 33 blink::mojom::PresentationSessionInfo::New()); | 33 blink::mojom::PresentationSessionInfo::New()); |
| 34 output->url = input.presentation_url; | 34 output->url = input.presentation_url; |
| 35 output->id = input.presentation_id; | 35 output->id = input.presentation_id; |
| 36 output->is_offscreen = input.is_offscreen; |
| 36 return output; | 37 return output; |
| 37 } | 38 } |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 template <> | 41 template <> |
| 41 struct TypeConverter<content::PresentationSessionInfo, | 42 struct TypeConverter<content::PresentationSessionInfo, |
| 42 blink::mojom::PresentationSessionInfoPtr> { | 43 blink::mojom::PresentationSessionInfoPtr> { |
| 43 static content::PresentationSessionInfo Convert( | 44 static content::PresentationSessionInfo Convert( |
| 44 const blink::mojom::PresentationSessionInfoPtr& input) { | 45 const blink::mojom::PresentationSessionInfoPtr& input) { |
| 45 return content::PresentationSessionInfo(input->url, input->id); | 46 return content::PresentationSessionInfo(input->url, input->id); |
| 46 } | 47 } |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 template <> | 50 template <> |
| 50 struct TypeConverter<blink::mojom::PresentationErrorPtr, | 51 struct TypeConverter<blink::mojom::PresentationErrorPtr, |
| 51 content::PresentationError> { | 52 content::PresentationError> { |
| 52 static blink::mojom::PresentationErrorPtr Convert( | 53 static blink::mojom::PresentationErrorPtr Convert( |
| 53 const content::PresentationError& input) { | 54 const content::PresentationError& input) { |
| 54 blink::mojom::PresentationErrorPtr output( | 55 blink::mojom::PresentationErrorPtr output( |
| 55 blink::mojom::PresentationError::New()); | 56 blink::mojom::PresentationError::New()); |
| 56 output->error_type = PresentationErrorTypeToMojo(input.error_type); | 57 output->error_type = PresentationErrorTypeToMojo(input.error_type); |
| 57 output->message = input.message; | 58 output->message = input.message; |
| 58 return output; | 59 return output; |
| 59 } | 60 } |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace mojo | 63 } // namespace mojo |
| 63 | 64 |
| 64 #endif // CONTENT_BROWSER_PRESENTATION_PRESENTATION_TYPE_CONVERTERS_H_ | 65 #endif // CONTENT_BROWSER_PRESENTATION_PRESENTATION_TYPE_CONVERTERS_H_ |
| OLD | NEW |