blob: dc9f5458a28f45352d8ad2c7a6e3c1a99aafc7f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/browser_plugin/mock_browser_plugin.h"
#include "content/renderer/render_process_impl.h"
namespace content {
MockBrowserPlugin::MockBrowserPlugin(
int id,
RenderViewImpl* render_view,
WebKit::WebFrame* frame,
const WebKit::WebPluginParams& params)
: BrowserPlugin(id, render_view, frame, params),
transport_dib_next_sequence_number_(0) {
}
MockBrowserPlugin::~MockBrowserPlugin() {}
TransportDIB* MockBrowserPlugin::CreateTransportDIB(const size_t size) {
return TransportDIB::Create(size, transport_dib_next_sequence_number_++);
}
void MockBrowserPlugin::FreeDamageBuffer(TransportDIB** damage_buffer) {
DCHECK(*damage_buffer);
RenderProcess::current()->FreeTransportDIB(*damage_buffer);
*damage_buffer = NULL;
}
} // namespace content
|