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

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

Issue 617123005: Remove BrowserPlugin tests (only one test remaining with existing coverage) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make_lifetime_explicit
Patch Set: More cleanup Created 6 years, 2 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_MANAGER_H_
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_MANAGER_H_
7
8 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
9
10 #include "base/memory/scoped_ptr.h"
11 #include "content/public/renderer/browser_plugin_delegate.h"
12 #include "ipc/ipc_message_utils.h"
13 #include "ipc/ipc_test_sink.h"
14
15 namespace content {
16
17 class MockBrowserPlugin;
18
19 class MockBrowserPluginManager : public BrowserPluginManager {
20 public:
21 MockBrowserPluginManager(RenderViewImpl* render_view);
22
23 // BrowserPluginManager implementation.
24 virtual BrowserPlugin* CreateBrowserPlugin(
25 RenderViewImpl* render_view,
26 blink::WebFrame* frame,
27 scoped_ptr<BrowserPluginDelegate> delegate) OVERRIDE;
28
29 // Provides access to the messages that have been received by this thread.
30 IPC::TestSink& sink() { return sink_; }
31
32 // RenderViewObserver override.
33 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
34 virtual bool Send(IPC::Message* msg) OVERRIDE;
35
36 // Returns the latest browser plugin that was created by this manager.
37 MockBrowserPlugin* last_plugin() { return last_plugin_; }
38
39 protected:
40 virtual ~MockBrowserPluginManager();
41
42 IPC::TestSink sink_;
43
44 // The last known good deserializer for sync messages.
45 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_;
46
47 MockBrowserPlugin* last_plugin_;
48
49 DISALLOW_COPY_AND_ASSIGN(MockBrowserPluginManager);
50 };
51
52 } // namespace content
53
54 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_MOCK_BROWSER_PLUGIN_MANAGER_H_
OLDNEW
« 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