OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/memory/ref_counted.h" | |
5 #include "ppapi/c/pp_bool.h" | 6 #include "ppapi/c/pp_bool.h" |
6 #include "ppapi/c/pp_completion_callback.h" | 7 #include "ppapi/c/pp_completion_callback.h" |
7 #include "ppapi/c/pp_point.h" | 8 #include "ppapi/c/pp_point.h" |
8 #include "ppapi/c/pp_rect.h" | 9 #include "ppapi/c/pp_rect.h" |
9 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
10 #include "ppapi/c/pp_size.h" | 11 #include "ppapi/c/pp_size.h" |
11 | 12 |
12 namespace ppapi { | 13 namespace ppapi { |
14 | |
15 class TrackedCallback; | |
16 | |
13 namespace thunk { | 17 namespace thunk { |
14 | 18 |
15 class PPB_Graphics2D_API { | 19 class PPB_Graphics2D_API { |
16 public: | 20 public: |
17 virtual ~PPB_Graphics2D_API() {} | 21 virtual ~PPB_Graphics2D_API() {} |
18 | 22 |
19 virtual PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque) = 0; | 23 virtual PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque) = 0; |
20 virtual void PaintImageData(PP_Resource image_data, | 24 virtual void PaintImageData(PP_Resource image_data, |
21 const PP_Point* top_left, | 25 const PP_Point* top_left, |
22 const PP_Rect* src_rect) = 0; | 26 const PP_Rect* src_rect) = 0; |
23 virtual void Scroll(const PP_Rect* clip_rect, | 27 virtual void Scroll(const PP_Rect* clip_rect, |
24 const PP_Point* amount) = 0; | 28 const PP_Point* amount) = 0; |
25 virtual void ReplaceContents(PP_Resource image_data) = 0; | 29 virtual void ReplaceContents(PP_Resource image_data) = 0; |
26 virtual int32_t Flush(PP_CompletionCallback callback) = 0; | 30 virtual int32_t Flush(scoped_refptr<TrackedCallback> callback) = 0; |
brettw
2012/05/20 17:46:46
I hate to bring this up, but is it necessary to pa
dmichael (off chromium)
2012/05/22 18:08:39
Aw, this is why I started with a typedef :-p
I li
dmichael (off chromium)
2012/06/22 18:14:05
^^^^^ Just wanted to point this comment out again,
| |
27 }; | 31 }; |
28 | 32 |
29 } // namespace thunk | 33 } // namespace thunk |
30 } // namespace ppapi | 34 } // namespace ppapi |
OLD | NEW |