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

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

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