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

Unified Diff: cc/ipc/copy_output_result_struct_traits.h

Issue 2670213006: Mojom structs for copy requests / results should map to unique_ptr (Closed)
Patch Set: c Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/ipc/copy_output_result.typemap ('k') | cc/ipc/copy_output_result_struct_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/copy_output_result_struct_traits.h
diff --git a/cc/ipc/copy_output_result_struct_traits.h b/cc/ipc/copy_output_result_struct_traits.h
index e52dcfbfd21c94057fe5d55b267f316c7f6cb8ee..727ac7c67136f7520bdc3f26ddd0ce915c0ae34d 100644
--- a/cc/ipc/copy_output_result_struct_traits.h
+++ b/cc/ipc/copy_output_result_struct_traits.h
@@ -14,20 +14,23 @@
namespace mojo {
template <>
-struct StructTraits<cc::mojom::CopyOutputResultDataView, cc::CopyOutputResult> {
- static const gfx::Size& size(const cc::CopyOutputResult& result) {
- return result.size_;
+struct StructTraits<cc::mojom::CopyOutputResultDataView,
+ std::unique_ptr<cc::CopyOutputResult>> {
+ static const gfx::Size& size(
+ const std::unique_ptr<cc::CopyOutputResult>& result) {
+ return result->size_;
}
- static const SkBitmap& bitmap(const cc::CopyOutputResult& result);
+ static const SkBitmap& bitmap(
+ const std::unique_ptr<cc::CopyOutputResult>& result);
static const cc::TextureMailbox& texture_mailbox(
- const cc::CopyOutputResult& result) {
- return result.texture_mailbox_;
+ const std::unique_ptr<cc::CopyOutputResult>& result) {
+ return result->texture_mailbox_;
}
static bool Read(cc::mojom::CopyOutputResultDataView data,
- cc::CopyOutputResult* out);
+ std::unique_ptr<cc::CopyOutputResult>* out_p);
};
} // namespace mojo
« no previous file with comments | « cc/ipc/copy_output_result.typemap ('k') | cc/ipc/copy_output_result_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698