OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GLUE_PLUGINS_PEPPER_DEVICE_CONTEXT_2D_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_DEVICE_CONTEXT_2D_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_DEVICE_CONTEXT_2D_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_DEVICE_CONTEXT_2D_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void Paint(WebKit::WebCanvas* canvas, | 60 void Paint(WebKit::WebCanvas* canvas, |
61 const gfx::Rect& plugin_rect, | 61 const gfx::Rect& plugin_rect, |
62 const gfx::Rect& paint_rect); | 62 const gfx::Rect& paint_rect); |
63 | 63 |
64 // Notifications that the view has rendered the page and that it has been | 64 // Notifications that the view has rendered the page and that it has been |
65 // flushed to the screen. These messages are used to send Flush callbacks to | 65 // flushed to the screen. These messages are used to send Flush callbacks to |
66 // the plugin. See | 66 // the plugin. See |
67 void ViewInitiatedPaint(); | 67 void ViewInitiatedPaint(); |
68 void ViewFlushedPaint(); | 68 void ViewFlushedPaint(); |
69 | 69 |
| 70 ImageData* image_data() { return image_data_.get(); } |
| 71 |
70 private: | 72 private: |
71 // Tracks a call to flush that requires a callback. | 73 // Tracks a call to flush that requires a callback. |
72 class FlushCallbackData { | 74 class FlushCallbackData { |
73 public: | 75 public: |
74 FlushCallbackData() { | 76 FlushCallbackData() { |
75 Clear(); | 77 Clear(); |
76 } | 78 } |
77 | 79 |
78 FlushCallbackData(const PP_CompletionCallback& callback) { | 80 FlushCallbackData(const PP_CompletionCallback& callback) { |
79 Set(callback); | 81 Set(callback); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // later. This is set when one of those tasks is pending so that we can | 166 // later. This is set when one of those tasks is pending so that we can |
165 // enforce the "only one pending flush at a time" constraint in the API. | 167 // enforce the "only one pending flush at a time" constraint in the API. |
166 bool offscreen_flush_pending_; | 168 bool offscreen_flush_pending_; |
167 | 169 |
168 DISALLOW_COPY_AND_ASSIGN(DeviceContext2D); | 170 DISALLOW_COPY_AND_ASSIGN(DeviceContext2D); |
169 }; | 171 }; |
170 | 172 |
171 } // namespace pepper | 173 } // namespace pepper |
172 | 174 |
173 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_DEVICE_CONTEXT_2D_H_ | 175 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_DEVICE_CONTEXT_2D_H_ |
OLD | NEW |