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