| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_PPB_LAYER_COMPOSITOR_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_LAYER_COMPOSITOR_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_LAYER_COMPOSITOR_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_LAYER_COMPOSITOR_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" |
| 8 #include "ppapi/thunk/ppb_layer_compositor_api.h" | 9 #include "ppapi/thunk/ppb_layer_compositor_api.h" |
| 9 #include "webkit/plugins/ppapi/resource.h" | 10 #include "ppapi/shared_impl/resource.h" |
| 10 | 11 |
| 11 struct PP_Rect; | 12 struct PP_Rect; |
| 12 struct PP_Size; | 13 struct PP_Size; |
| 13 | 14 |
| 14 namespace webkit { | 15 namespace webkit { |
| 15 namespace ppapi { | 16 namespace ppapi { |
| 16 | 17 |
| 17 class PluginInstance; | |
| 18 | |
| 19 class PPB_LayerCompositor_Impl | 18 class PPB_LayerCompositor_Impl |
| 20 : public Resource, | 19 : public ::ppapi::Resource, |
| 21 public ::ppapi::thunk::PPB_LayerCompositor_API { | 20 public ::ppapi::thunk::PPB_LayerCompositor_API { |
| 22 public: | 21 public: |
| 23 explicit PPB_LayerCompositor_Impl(PluginInstance* instance); | 22 explicit PPB_LayerCompositor_Impl(PP_Instance instance); |
| 24 virtual ~PPB_LayerCompositor_Impl(); | 23 virtual ~PPB_LayerCompositor_Impl(); |
| 25 | 24 |
| 26 static const PPB_LayerCompositor_Dev* GetInterface(); | 25 static const PPB_LayerCompositor_Dev* GetInterface(); |
| 27 | 26 |
| 28 // Resource override. | 27 // Resource override. |
| 29 virtual PPB_LayerCompositor_API* AsPPB_LayerCompositor_API(); | 28 virtual PPB_LayerCompositor_API* AsPPB_LayerCompositor_API(); |
| 30 | 29 |
| 31 // PPB_LayerCompositor_API implementation. | 30 // PPB_LayerCompositor_API implementation. |
| 32 virtual PP_Bool AddLayer(PP_Resource layer) OVERRIDE; | 31 virtual PP_Bool AddLayer(PP_Resource layer) OVERRIDE; |
| 33 virtual void RemoveLayer(PP_Resource layer) OVERRIDE; | 32 virtual void RemoveLayer(PP_Resource layer) OVERRIDE; |
| 34 virtual void SetZIndex(PP_Resource layer, int32_t index) OVERRIDE; | 33 virtual void SetZIndex(PP_Resource layer, int32_t index) OVERRIDE; |
| 35 virtual void SetRect(PP_Resource layer, const PP_Rect* rect) OVERRIDE; | 34 virtual void SetRect(PP_Resource layer, const PP_Rect* rect) OVERRIDE; |
| 36 virtual void SetDisplay(PP_Resource layer, PP_Bool is_displayed) OVERRIDE; | 35 virtual void SetDisplay(PP_Resource layer, PP_Bool is_displayed) OVERRIDE; |
| 37 virtual void MarkAsDirty(PP_Resource layer) OVERRIDE; | 36 virtual void MarkAsDirty(PP_Resource layer) OVERRIDE; |
| 38 virtual int32_t SwapBuffers(PP_CompletionCallback callback) OVERRIDE; | 37 virtual int32_t SwapBuffers(PP_CompletionCallback callback) OVERRIDE; |
| 39 | 38 |
| 40 private: | 39 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(PPB_LayerCompositor_Impl); | 40 DISALLOW_COPY_AND_ASSIGN(PPB_LayerCompositor_Impl); |
| 42 }; | 41 }; |
| 43 | 42 |
| 44 } // namespace ppapi | 43 } // namespace ppapi |
| 45 } // namespace webkit | 44 } // namespace webkit |
| 46 | 45 |
| 47 #endif // WEBKIT_PLUGINS_PPAPI_PPB_LAYER_COMPOSITOR_IMPL_H_ | 46 #endif // WEBKIT_PLUGINS_PPAPI_PPB_LAYER_COMPOSITOR_IMPL_H_ |
| OLD | NEW |