| OLD | NEW |
| 1 // Copyright (c) 2012 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 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_H_ | 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_H_ |
| 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_H_ | 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_H_ |
| 7 | 7 |
| 8 #include "content/renderer/browser_plugin/browser_plugin.h" | 8 #include "content/renderer/browser_plugin/browser_plugin.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 class MockBrowserPlugin : public BrowserPlugin { | 12 class MockBrowserPlugin : public BrowserPlugin { |
| 13 public: | 13 public: |
| 14 MockBrowserPlugin( | 14 MockBrowserPlugin( |
| 15 int id, | 15 int id, |
| 16 RenderViewImpl* render_view, | 16 RenderViewImpl* render_view, |
| 17 WebKit::WebFrame* frame, | 17 WebKit::WebFrame* frame, |
| 18 const WebKit::WebPluginParams& params); | 18 const WebKit::WebPluginParams& params); |
| 19 | 19 |
| 20 virtual ~MockBrowserPlugin(); | 20 virtual ~MockBrowserPlugin(); |
| 21 | 21 |
| 22 // Takes ownership of message. |
| 23 bool ReceiveMessage(IPC::Message* message); |
| 24 |
| 22 virtual TransportDIB* CreateTransportDIB(const size_t size) OVERRIDE; | 25 virtual TransportDIB* CreateTransportDIB(const size_t size) OVERRIDE; |
| 23 virtual void FreeDamageBuffer(TransportDIB** damage_buffer) OVERRIDE; | 26 virtual void FreeDamageBuffer(TransportDIB** damage_buffer) OVERRIDE; |
| 24 | 27 |
| 25 // Allow poking at a few private members. | 28 // Allow poking at a few private members. |
| 26 using BrowserPlugin::guest_crashed_; | 29 using BrowserPlugin::guest_crashed_; |
| 27 using BrowserPlugin::pending_damage_buffer_; | 30 using BrowserPlugin::pending_damage_buffer_; |
| 28 | 31 |
| 29 private: | 32 private: |
| 30 int transport_dib_next_sequence_number_; | 33 int transport_dib_next_sequence_number_; |
| 31 }; | 34 }; |
| 32 | 35 |
| 33 } // namespace content | 36 } // namespace content |
| 34 | 37 |
| 35 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_H_ | 38 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_H_ |
| OLD | NEW |