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

Side by Side Diff: mojo/services/gfx/images/cpp/image_pipe_producer_endpoint.h

Issue 2229573002: Change the canonical way to include the C macros.h to <mojo/macros.h>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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 MOJO_SERVICES_GFX_IMAGES_INTERFACES_IMAGE_PIPE_PRODUCER_ENDPOINT_H_ 5 #ifndef MOJO_SERVICES_GFX_IMAGES_INTERFACES_IMAGE_PIPE_PRODUCER_ENDPOINT_H_
6 #define MOJO_SERVICES_GFX_IMAGES_INTERFACES_IMAGE_PIPE_PRODUCER_ENDPOINT_H_ 6 #define MOJO_SERVICES_GFX_IMAGES_INTERFACES_IMAGE_PIPE_PRODUCER_ENDPOINT_H_
7 7
8 #include "image_pipe_endpoint.h" 8 #include "image_pipe_endpoint.h"
9 #include "mojo/public/c/system/macros.h" 9 #include "mojo/public/cpp/system/macros.h"
10 #include "mojo/services/gfx/images/interfaces/image_pipe.mojom.h" 10 #include "mojo/services/gfx/images/interfaces/image_pipe.mojom.h"
11 11
12 namespace image_pipe { 12 namespace image_pipe {
13 13
14 // This class wraps the producer end of an ImagePipe and validates the sanity 14 // This class wraps the producer end of an ImagePipe and validates the sanity
15 // of both the producer actions and the consumer actions coming over the 15 // of both the producer actions and the consumer actions coming over the
16 // message pipe. It also tracks the state of Images in the pipe's image pool 16 // message pipe. It also tracks the state of Images in the pipe's image pool
17 // and provides conviennce mechanisms for accessing this state (like the ability 17 // and provides conviennce mechanisms for accessing this state (like the ability
18 // to get the ID of an available image without having to manually track the 18 // to get the ID of an available image without having to manually track the
19 // lifecycle of these images. 19 // lifecycle of these images.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // This exists wrap ImagePipeEndpoint::ConsumerRelease because for some reason 56 // This exists wrap ImagePipeEndpoint::ConsumerRelease because for some reason
57 // GCC doesnt like us calling protected methods on our base class from inside 57 // GCC doesnt like us calling protected methods on our base class from inside
58 // a lambda that captures 'this', which breaks the fnl build. Clang handles it 58 // a lambda that captures 'this', which breaks the fnl build. Clang handles it
59 // fine, but its unclear whos right here, so we trampoline it as a workaround 59 // fine, but its unclear whos right here, so we trampoline it as a workaround
60 void ConsumerReleaseInternal(uint32_t id, 60 void ConsumerReleaseInternal(uint32_t id,
61 mojo::gfx::PresentationStatus status); 61 mojo::gfx::PresentationStatus status);
62 62
63 ImagePipeEndpoint state_tracker_; 63 ImagePipeEndpoint state_tracker_;
64 mojo::gfx::ImagePipePtr image_pipe_ptr_; 64 mojo::gfx::ImagePipePtr image_pipe_ptr_;
65 std::function<void()> endpoint_closed_callback_; 65 std::function<void()> endpoint_closed_callback_;
66
67 MOJO_DISALLOW_COPY_AND_ASSIGN(ImagePipeProducerEndpoint);
66 }; 68 };
67 69
68 } // namespace image_pipe 70 } // namespace image_pipe
69 71
70 #endif // MOJO_SERVICES_GFX_IMAGES_INTERFACES_IMAGE_PIPE_PRODUCER_ENDPOINT_H_ 72 #endif // MOJO_SERVICES_GFX_IMAGES_INTERFACES_IMAGE_PIPE_PRODUCER_ENDPOINT_H_
OLDNEW
« no previous file with comments | « mojo/services/gfx/images/cpp/image_pipe_endpoint.h ('k') | mojom/generators/c/templates/header.tmpl.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698