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

Unified Diff: content/renderer/browser_plugin/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: Initialize content shell resources 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/browser_plugin/mock_browser_plugin_manager.h
diff --git a/content/renderer/browser_plugin/mock_browser_plugin_manager.h b/content/renderer/browser_plugin/mock_browser_plugin_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..90be1cdbd5af2f0ae813fcc62657b317fb71be52
--- /dev/null
+++ b/content/renderer/browser_plugin/mock_browser_plugin_manager.h
@@ -0,0 +1,50 @@
+// 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_BROWSER_PLUGIN_MANAGER_IMPL_H_
+#define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_
+
+#include "content/renderer/browser_plugin/browser_plugin_manager.h"
+
+#include "base/memory/scoped_ptr.h"
+#include "ipc/ipc_message_utils.h"
+#include "ipc/ipc_test_sink.h"
+
+namespace content {
+
+class MockBrowserPluginManager : public BrowserPluginManager {
+ public:
+ MockBrowserPluginManager();
+ virtual ~MockBrowserPluginManager();
+
+ // BrowserPluginManager implementation.
+ virtual BrowserPlugin* CreateBrowserPlugin(
+ RenderViewImpl* render_view,
+ WebKit::WebFrame* frame,
+ const WebKit::WebPluginParams& params) OVERRIDE;
+
+ // Iterate over all BrowserPlugins and tell them to cleanup after themselves
+ // before we blow away the MockRenderProcess.
+ void Cleanup();
+
+ // Provides access to the messages that have been received by this thread.
+ IPC::TestSink& sink() { return sink_; }
+
+ // IPC::Sender implementation.
+ virtual bool Send(IPC::Message* msg) OVERRIDE;
+
+ // RenderProcessObserver override.
+ virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
+ private:
+ IPC::TestSink sink_;
+
+ // The last known good deserializer for sync messages.
+ scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockBrowserPluginManager);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_BROWSER_PLUGIN_TESTS_BROWSER_PLUGIN_MANAGER_IMPL_H_
« no previous file with comments | « content/renderer/browser_plugin/mock_browser_plugin.cc ('k') | content/renderer/browser_plugin/mock_browser_plugin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698