OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 PPAPI_PROXY_COMPOSITOR_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_COMPOSITOR_RESOURCE_H_ |
6 #define PPAPI_PROXY_COMPOSITOR_RESOURCE_H_ | 6 #define PPAPI_PROXY_COMPOSITOR_RESOURCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "ppapi/proxy/compositor_layer_resource.h" | 10 #include "ppapi/proxy/compositor_layer_resource.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 public thunk::PPB_Compositor_API { | 21 public thunk::PPB_Compositor_API { |
22 public: | 22 public: |
23 CompositorResource(Connection connection, | 23 CompositorResource(Connection connection, |
24 PP_Instance instance); | 24 PP_Instance instance); |
25 | 25 |
26 bool IsInProgress() const; | 26 bool IsInProgress() const; |
27 | 27 |
28 int32_t GenerateResourceId() const; | 28 int32_t GenerateResourceId() const; |
29 | 29 |
30 private: | 30 private: |
31 virtual ~CompositorResource(); | 31 ~CompositorResource() override; |
32 | 32 |
33 // Resource overrides: | 33 // Resource overrides: |
34 virtual thunk::PPB_Compositor_API* AsPPB_Compositor_API() override; | 34 thunk::PPB_Compositor_API* AsPPB_Compositor_API() override; |
35 | 35 |
36 // PluginResource overrides: | 36 // PluginResource overrides: |
37 virtual void OnReplyReceived(const ResourceMessageReplyParams& params, | 37 void OnReplyReceived(const ResourceMessageReplyParams& params, |
38 const IPC::Message& msg) override; | 38 const IPC::Message& msg) override; |
39 | 39 |
40 // thunk::PPB_Compositor_API overrides: | 40 // thunk::PPB_Compositor_API overrides: |
41 virtual PP_Resource AddLayer() override; | 41 PP_Resource AddLayer() override; |
42 virtual int32_t CommitLayers( | 42 int32_t CommitLayers(const scoped_refptr<TrackedCallback>& callback) override; |
43 const scoped_refptr<TrackedCallback>& callback) override; | 43 int32_t ResetLayers() override; |
44 virtual int32_t ResetLayers() override; | |
45 | 44 |
46 // IPC msg handlers: | 45 // IPC msg handlers: |
47 void OnPluginMsgCommitLayersReply(const ResourceMessageReplyParams& params); | 46 void OnPluginMsgCommitLayersReply(const ResourceMessageReplyParams& params); |
48 void OnPluginMsgReleaseResource( | 47 void OnPluginMsgReleaseResource( |
49 const ResourceMessageReplyParams& params, | 48 const ResourceMessageReplyParams& params, |
50 int32_t id, | 49 int32_t id, |
51 uint32_t sync_point, | 50 uint32_t sync_point, |
52 bool is_lost); | 51 bool is_lost); |
53 | 52 |
54 void ResetLayersInternal(bool is_aborted); | 53 void ResetLayersInternal(bool is_aborted); |
(...skipping 16 matching lines...) Expand all Loading... |
71 // The last resource id for texture or image. | 70 // The last resource id for texture or image. |
72 mutable int32_t last_resource_id_; | 71 mutable int32_t last_resource_id_; |
73 | 72 |
74 DISALLOW_COPY_AND_ASSIGN(CompositorResource); | 73 DISALLOW_COPY_AND_ASSIGN(CompositorResource); |
75 }; | 74 }; |
76 | 75 |
77 } // namespace proxy | 76 } // namespace proxy |
78 } // namespace ppapi | 77 } // namespace ppapi |
79 | 78 |
80 #endif // PPAPI_PROXY_COMPOSITOR_RESOURCE_H_ | 79 #endif // PPAPI_PROXY_COMPOSITOR_RESOURCE_H_ |
OLD | NEW |