| 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 CC_IPC_COPY_OUTPUT_REQUEST_STRUCT_TRAITS_H_ | 5 #ifndef CC_IPC_COPY_OUTPUT_REQUEST_STRUCT_TRAITS_H_ |
| 6 #define CC_IPC_COPY_OUTPUT_REQUEST_STRUCT_TRAITS_H_ | 6 #define CC_IPC_COPY_OUTPUT_REQUEST_STRUCT_TRAITS_H_ |
| 7 | 7 |
| 8 #include "cc/ipc/copy_output_request.mojom-shared.h" | 8 #include "cc/ipc/copy_output_request.mojom.h" |
| 9 #include "cc/ipc/texture_mailbox_struct_traits.h" | 9 #include "cc/ipc/texture_mailbox_struct_traits.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| 11 #include "mojo/common/common_custom_types_struct_traits.h" | 11 #include "mojo/common/common_custom_types_struct_traits.h" |
| 12 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" | 12 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 | 15 |
| 16 template <> | 16 template <> |
| 17 struct StructTraits<cc::mojom::CopyOutputRequestDataView, | 17 struct StructTraits<cc::mojom::CopyOutputRequestDataView, |
| 18 std::unique_ptr<cc::CopyOutputRequest>> { | 18 std::unique_ptr<cc::CopyOutputRequest>> { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 29 static const base::Optional<gfx::Rect>& area( | 29 static const base::Optional<gfx::Rect>& area( |
| 30 const std::unique_ptr<cc::CopyOutputRequest>& request) { | 30 const std::unique_ptr<cc::CopyOutputRequest>& request) { |
| 31 return request->area_; | 31 return request->area_; |
| 32 } | 32 } |
| 33 | 33 |
| 34 static const base::Optional<cc::TextureMailbox>& texture_mailbox( | 34 static const base::Optional<cc::TextureMailbox>& texture_mailbox( |
| 35 const std::unique_ptr<cc::CopyOutputRequest>& request) { | 35 const std::unique_ptr<cc::CopyOutputRequest>& request) { |
| 36 return request->texture_mailbox_; | 36 return request->texture_mailbox_; |
| 37 } | 37 } |
| 38 | 38 |
| 39 static cc::mojom::CopyOutputResultSenderPtr result_sender( |
| 40 const std::unique_ptr<cc::CopyOutputRequest>& request); |
| 41 |
| 39 static bool Read(cc::mojom::CopyOutputRequestDataView data, | 42 static bool Read(cc::mojom::CopyOutputRequestDataView data, |
| 40 std::unique_ptr<cc::CopyOutputRequest>* out_p); | 43 std::unique_ptr<cc::CopyOutputRequest>* out_p); |
| 41 }; | 44 }; |
| 42 | 45 |
| 43 } // namespace mojo | 46 } // namespace mojo |
| 44 | 47 |
| 45 #endif // CC_IPC_COPY_OUTPUT_REQUEST_STRUCT_TRAITS_H_ | 48 #endif // CC_IPC_COPY_OUTPUT_REQUEST_STRUCT_TRAITS_H_ |
| OLD | NEW |