Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: content/renderer/browser_plugin/tests/mock_browser_plugin_manager.h

Issue 10830072: Browser Plugin: New Implementation (Renderer Side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed leaky Persistents in BrowserPlugin Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_TESTS_BROWSER_PLUGIN_MANAGER_IMPL_H_
2 #define CONTENT_RENDERER_BROWSER_PLUGIN_TESTS_BROWSER_PLUGIN_MANAGER_IMPL_H_
3
4 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
5
6 #include "base/memory/scoped_ptr.h"
7 #include "ipc/ipc_message_utils.h"
8 #include "ipc/ipc_test_sink.h"
9
10 namespace content {
11 namespace browser_plugin {
12
13 class MockBrowserPluginManager : public BrowserPluginManager {
14 public:
15 MockBrowserPluginManager();
16 virtual ~MockBrowserPluginManager();
17
18 // BrowserPluginManager implementation.
19 virtual BrowserPlugin* CreateBrowserPlugin(
20 RenderViewImpl* render_view,
21 WebKit::WebFrame* frame,
22 const WebKit::WebPluginParams& params) OVERRIDE;
23
24 // Iterate over all BrowserPlugins and tell them to cleanup after themselves
25 // before we blow away the MockRenderProcess.
26 void Cleanup();
27
28 // Provides access to the messages that have been received by this thread.
29 IPC::TestSink& sink() { return sink_; }
30
31 // IPC::Sender implementation.
32 virtual bool Send(IPC::Message* msg) OVERRIDE;
33
34 // RenderProcessObserver override.
35 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
36 private:
37 IPC::TestSink sink_;
38
39 // The last known good deserializer for sync messages.
40 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_;
41
42 DISALLOW_COPY_AND_ASSIGN(MockBrowserPluginManager);
43 };
44
45 } // namespace browser_plugin
46 } // namespace content
47
48 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_TESTS_BROWSER_PLUGIN_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698