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

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

Issue 6899055: PPAPI: Force async callback invocation option. (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 "ppapi/thunk/common.h"
8 #include "webkit/plugins/ppapi/common.h" 9 #include "webkit/plugins/ppapi/common.h"
9 10
11 using ppapi::thunk::MayForceCallback;
12
10 namespace webkit { 13 namespace webkit {
11 namespace ppapi { 14 namespace ppapi {
12 15
13 namespace { 16 namespace {
14 17
15 PP_Resource Create(PP_Instance instance) { 18 PP_Resource Create(PP_Instance instance) {
16 return 0; 19 return 0;
17 } 20 }
18 21
19 PP_Bool IsLayerCompositor(PP_Resource resource) { 22 PP_Bool IsLayerCompositor(PP_Resource resource) {
(...skipping 16 matching lines...) Expand all
36 39
37 void SetDisplay(PP_Resource compositor, PP_Resource layer, 40 void SetDisplay(PP_Resource compositor, PP_Resource layer,
38 PP_Bool is_displayed) { 41 PP_Bool is_displayed) {
39 } 42 }
40 43
41 void MarkAsDirty(PP_Resource compositor, PP_Resource layer) { 44 void MarkAsDirty(PP_Resource compositor, PP_Resource layer) {
42 } 45 }
43 46
44 int32_t SwapBuffers(PP_Resource compositor, 47 int32_t SwapBuffers(PP_Resource compositor,
45 struct PP_CompletionCallback callback) { 48 struct PP_CompletionCallback callback) {
46 return PP_ERROR_FAILED; 49 return MayForceCallback(callback, PP_ERROR_FAILED);
47 } 50 }
48 51
49 const PPB_LayerCompositor_Dev ppb_layercompositor = { 52 const PPB_LayerCompositor_Dev ppb_layercompositor = {
50 &Create, 53 &Create,
51 &IsLayerCompositor, 54 &IsLayerCompositor,
52 &AddLayer, 55 &AddLayer,
53 &RemoveLayer, 56 &RemoveLayer,
54 &SetZIndex, 57 &SetZIndex,
55 &SetRect, 58 &SetRect,
56 &SetDisplay, 59 &SetDisplay,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void PPB_LayerCompositor_Impl::MarkAsDirty(PP_Resource layer) { 101 void PPB_LayerCompositor_Impl::MarkAsDirty(PP_Resource layer) {
99 } 102 }
100 103
101 int32_t PPB_LayerCompositor_Impl::SwapBuffers( 104 int32_t PPB_LayerCompositor_Impl::SwapBuffers(
102 struct PP_CompletionCallback callback) { 105 struct PP_CompletionCallback callback) {
103 return PP_ERROR_FAILED; 106 return PP_ERROR_FAILED;
104 } 107 }
105 108
106 } // namespace ppapi 109 } // namespace ppapi
107 } // namespace webkit 110 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698