summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/pepper_devices.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/pepper_devices.cc')
-rw-r--r--chrome/renderer/pepper_devices.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome/renderer/pepper_devices.cc b/chrome/renderer/pepper_devices.cc
index 07da49d..57189d4 100644
--- a/chrome/renderer/pepper_devices.cc
+++ b/chrome/renderer/pepper_devices.cc
@@ -20,11 +20,30 @@ const uint32 kBytesPerPixel = 4; // Only 8888 RGBA for now.
int Graphics2DDeviceContext::next_buffer_id_ = 0;
+struct Graphics2DDeviceContext::FlushCallbackData {
+ FlushCallbackData(NPDeviceFlushContextCallbackPtr f,
+ NPP n,
+ NPDeviceContext2D* c,
+ NPUserData* u)
+ : function(f),
+ npp(n),
+ context(c),
+ user_data(u) {
+ }
+
+ NPDeviceFlushContextCallbackPtr function;
+ NPP npp;
+ NPDeviceContext2D* context;
+ NPUserData* user_data;
+};
+
Graphics2DDeviceContext::Graphics2DDeviceContext(
WebPluginDelegatePepper* plugin_delegate)
: plugin_delegate_(plugin_delegate) {
}
+Graphics2DDeviceContext::~Graphics2DDeviceContext() {}
+
NPError Graphics2DDeviceContext::Initialize(
gfx::Rect window_rect, const NPDeviceContext2DConfig* config,
NPDeviceContext2D* context) {
@@ -153,6 +172,12 @@ void Graphics2DDeviceContext::RenderViewFlushedPaint() {
painted_flush_callbacks_.clear();
}
+AudioDeviceContext::AudioDeviceContext()
+ : context_(NULL),
+ stream_id_(0),
+ shared_memory_size_(0) {
+}
+
AudioDeviceContext::~AudioDeviceContext() {
if (stream_id_) {
OnDestroy();