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

Side by Side Diff: webkit/plugins/ppapi/ppb_layer_compositor_impl.cc

Issue 7206016: Convert most remaining resources to use the API/thunk system. The significant (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
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 #include "webkit/plugins/ppapi/ppb_layer_compositor_impl.h" 5 #include "webkit/plugins/ppapi/ppb_layer_compositor_impl.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "webkit/plugins/ppapi/common.h" 8 #include "webkit/plugins/ppapi/common.h"
9 9
10 using ppapi::thunk::PPB_LayerCompositor_API;
11
10 namespace webkit { 12 namespace webkit {
11 namespace ppapi { 13 namespace ppapi {
12 14
13 namespace {
14
15 PP_Resource Create(PP_Instance instance) {
16 return 0;
17 }
18
19 PP_Bool IsLayerCompositor(PP_Resource resource) {
20 return PP_FALSE;
21 }
22
23 PP_Bool AddLayer(PP_Resource compositor, PP_Resource layer) {
24 return PP_FALSE;
25 }
26
27 void RemoveLayer(PP_Resource compositor, PP_Resource layer) {
28 }
29
30 void SetZIndex(PP_Resource compositor, PP_Resource layer, int32_t index) {
31 }
32
33 void SetRect(PP_Resource compositor, PP_Resource layer,
34 const struct PP_Rect* rect) {
35 }
36
37 void SetDisplay(PP_Resource compositor, PP_Resource layer,
38 PP_Bool is_displayed) {
39 }
40
41 void MarkAsDirty(PP_Resource compositor, PP_Resource layer) {
42 }
43
44 int32_t SwapBuffers(PP_Resource compositor,
45 struct PP_CompletionCallback callback) {
46 return PP_ERROR_FAILED;
47 }
48
49 const PPB_LayerCompositor_Dev ppb_layercompositor = {
50 &Create,
51 &IsLayerCompositor,
52 &AddLayer,
53 &RemoveLayer,
54 &SetZIndex,
55 &SetRect,
56 &SetDisplay,
57 &MarkAsDirty,
58 &SwapBuffers,
59 };
60
61 } // namespace
62
63 PPB_LayerCompositor_Impl::PPB_LayerCompositor_Impl(PluginInstance* instance) 15 PPB_LayerCompositor_Impl::PPB_LayerCompositor_Impl(PluginInstance* instance)
64 : Resource(instance) { 16 : Resource(instance) {
65 } 17 }
66 18
67 PPB_LayerCompositor_Impl::~PPB_LayerCompositor_Impl() { 19 PPB_LayerCompositor_Impl::~PPB_LayerCompositor_Impl() {
68 } 20 }
69 21
70 PPB_LayerCompositor_Impl* 22 PPB_LayerCompositor_API*
71 PPB_LayerCompositor_Impl::AsPPB_LayerCompositor_Impl() { 23 PPB_LayerCompositor_Impl::AsPPB_LayerCompositor_API() {
72 return this; 24 return this;
73 } 25 }
74 26
75 // static
76 const PPB_LayerCompositor_Dev* PPB_LayerCompositor_Impl::GetInterface() {
77 return &ppb_layercompositor;
78 }
79
80 PP_Bool PPB_LayerCompositor_Impl::AddLayer(PP_Resource layer) { 27 PP_Bool PPB_LayerCompositor_Impl::AddLayer(PP_Resource layer) {
81 return PP_FALSE; 28 return PP_FALSE;
82 } 29 }
83 30
84 void PPB_LayerCompositor_Impl::RemoveLayer(PP_Resource layer) { 31 void PPB_LayerCompositor_Impl::RemoveLayer(PP_Resource layer) {
85 } 32 }
86 33
87 void PPB_LayerCompositor_Impl::SetZIndex(PP_Resource layer, int32_t index) { 34 void PPB_LayerCompositor_Impl::SetZIndex(PP_Resource layer, int32_t index) {
88 } 35 }
89 36
90 void PPB_LayerCompositor_Impl::SetRect(PP_Resource layer, 37 void PPB_LayerCompositor_Impl::SetRect(PP_Resource layer,
91 const struct PP_Rect* rect) { 38 const PP_Rect* rect) {
92 } 39 }
93 40
94 void PPB_LayerCompositor_Impl::SetDisplay(PP_Resource layer, 41 void PPB_LayerCompositor_Impl::SetDisplay(PP_Resource layer,
95 PP_Bool is_displayed) { 42 PP_Bool is_displayed) {
96 } 43 }
97 44
98 void PPB_LayerCompositor_Impl::MarkAsDirty(PP_Resource layer) { 45 void PPB_LayerCompositor_Impl::MarkAsDirty(PP_Resource layer) {
99 } 46 }
100 47
101 int32_t PPB_LayerCompositor_Impl::SwapBuffers( 48 int32_t PPB_LayerCompositor_Impl::SwapBuffers(PP_CompletionCallback callback) {
102 struct PP_CompletionCallback callback) {
103 return PP_ERROR_FAILED; 49 return PP_ERROR_FAILED;
104 } 50 }
105 51
106 } // namespace ppapi 52 } // namespace ppapi
107 } // namespace webkit 53 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_layer_compositor_impl.h ('k') | webkit/plugins/ppapi/ppb_opengles_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698