| 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_LAYER_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_ | 6 #define PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/ppb_compositor_layer.h" | 8 #include "ppapi/c/ppb_compositor_layer.h" |
| 9 #include "ppapi/proxy/plugin_resource.h" | 9 #include "ppapi/proxy/plugin_resource.h" |
| 10 #include "ppapi/proxy/ppapi_proxy_export.h" | 10 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 11 #include "ppapi/shared_impl/compositor_layer_data.h" | 11 #include "ppapi/shared_impl/compositor_layer_data.h" |
| 12 #include "ppapi/shared_impl/scoped_pp_resource.h" | 12 #include "ppapi/shared_impl/scoped_pp_resource.h" |
| 13 #include "ppapi/thunk/ppb_compositor_layer_api.h" | 13 #include "ppapi/thunk/ppb_compositor_layer_api.h" |
| 14 | 14 |
| 15 namespace ppapi { | 15 namespace ppapi { |
| 16 namespace proxy { | 16 namespace proxy { |
| 17 | 17 |
| 18 class CompositorResource; | 18 class CompositorResource; |
| 19 | 19 |
| 20 class PPAPI_PROXY_EXPORT CompositorLayerResource | 20 class PPAPI_PROXY_EXPORT CompositorLayerResource |
| 21 : public PluginResource, | 21 : public PluginResource, |
| 22 public thunk::PPB_CompositorLayer_API { | 22 public thunk::PPB_CompositorLayer_API { |
| 23 public: | 23 public: |
| 24 // Release callback for texture or image layer. | 24 // Release callback for texture or image layer. |
| 25 typedef base::Callback<void(int32_t, uint32_t, bool)> ReleaseCallback; | 25 typedef base::Callback<void(uint32_t, bool)> ReleaseCallback; |
| 26 | 26 |
| 27 CompositorLayerResource(Connection connection, | 27 CompositorLayerResource(Connection connection, |
| 28 PP_Instance instance, | 28 PP_Instance instance, |
| 29 const CompositorResource* compositor); | 29 const CompositorResource* compositor); |
| 30 | 30 |
| 31 const CompositorLayerData& data() const { return data_; } | 31 const CompositorLayerData& data() const { return data_; } |
| 32 const ReleaseCallback& release_callback() const { | 32 const ReleaseCallback& release_callback() const { |
| 33 return release_callback_; | 33 return release_callback_; |
| 34 } | 34 } |
| 35 void ResetReleaseCallback() { release_callback_.Reset(); } | 35 void ResetReleaseCallback() { release_callback_.Reset(); } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // Layer data. | 90 // Layer data. |
| 91 CompositorLayerData data_; | 91 CompositorLayerData data_; |
| 92 | 92 |
| 93 DISALLOW_COPY_AND_ASSIGN(CompositorLayerResource); | 93 DISALLOW_COPY_AND_ASSIGN(CompositorLayerResource); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace proxy | 96 } // namespace proxy |
| 97 } // namespace ppapi | 97 } // namespace ppapi |
| 98 | 98 |
| 99 #endif // PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_ | 99 #endif // PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_ |
| OLD | NEW |