summaryrefslogtreecommitdiffstats
path: root/content/renderer/browser_plugin/mock_browser_plugin.h
blob: 965b7dd106d7add0b471a5309c7824a6e5c81bb4 (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
32
33
34
35
// 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.

#ifndef CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_H_
#define CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_H_

#include "content/renderer/browser_plugin/browser_plugin.h"

namespace content {

class MockBrowserPlugin : public BrowserPlugin {
 public:
  MockBrowserPlugin(
      int id,
      RenderViewImpl* render_view,
      WebKit::WebFrame* frame,
      const WebKit::WebPluginParams& params);

  virtual ~MockBrowserPlugin();

  virtual TransportDIB* CreateTransportDIB(const size_t size) OVERRIDE;
  virtual void FreeDamageBuffer(TransportDIB** damage_buffer) OVERRIDE;

  // Allow poking at a few private members.
  using BrowserPlugin::guest_crashed_;
  using BrowserPlugin::pending_damage_buffer_;

 private:
  int transport_dib_next_sequence_number_;
};

}  // namespace content

#endif  // CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_H_