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

Side by Side Diff: content/renderer/pepper/mock_plugin_delegate.h

Issue 21192002: Remove more methods from PluginDelegate. Some I moved the implementationto the callers. For others,… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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
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_PEPPER_MOCK_PLUGIN_DELEGATE_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_MOCK_PLUGIN_DELEGATE_H_
6 #define CONTENT_RENDERER_PEPPER_MOCK_PLUGIN_DELEGATE_H_ 6 #define CONTENT_RENDERER_PEPPER_MOCK_PLUGIN_DELEGATE_H_
7 7
8 #include "content/renderer/pepper/plugin_delegate.h" 8 #include "content/renderer/pepper/plugin_delegate.h"
9 9
10 struct PP_NetAddress_Private; 10 struct PP_NetAddress_Private;
11 namespace ppapi { class PPB_X509Certificate_Fields; } 11 namespace ppapi { class PPB_X509Certificate_Fields; }
12 12
13 namespace content { 13 namespace content {
14 14
15 class MockPluginDelegate : public PluginDelegate { 15 class MockPluginDelegate : public PluginDelegate {
16 public: 16 public:
17 MockPluginDelegate(); 17 MockPluginDelegate();
18 virtual ~MockPluginDelegate(); 18 virtual ~MockPluginDelegate();
19 19
20 virtual void PluginFocusChanged(PepperPluginInstanceImpl* instance, 20 virtual void PluginFocusChanged(PepperPluginInstanceImpl* instance,
21 bool focused) OVERRIDE; 21 bool focused) OVERRIDE;
22 virtual void PluginTextInputTypeChanged( 22 virtual void PluginTextInputTypeChanged(
23 PepperPluginInstanceImpl* instance) OVERRIDE; 23 PepperPluginInstanceImpl* instance) OVERRIDE;
24 virtual void PluginCaretPositionChanged( 24 virtual void PluginCaretPositionChanged(
25 PepperPluginInstanceImpl* instance) OVERRIDE; 25 PepperPluginInstanceImpl* instance) OVERRIDE;
26 virtual void PluginRequestedCancelComposition( 26 virtual void PluginRequestedCancelComposition(
27 PepperPluginInstanceImpl* instance) OVERRIDE; 27 PepperPluginInstanceImpl* instance) OVERRIDE;
28 virtual void PluginSelectionChanged( 28 virtual void PluginSelectionChanged(
29 PepperPluginInstanceImpl* instance) OVERRIDE; 29 PepperPluginInstanceImpl* instance) OVERRIDE;
30 virtual void PluginCrashed(PepperPluginInstanceImpl* instance) OVERRIDE;
31 virtual void InstanceCreated(PepperPluginInstanceImpl* instance) OVERRIDE; 30 virtual void InstanceCreated(PepperPluginInstanceImpl* instance) OVERRIDE;
32 virtual void InstanceDeleted(PepperPluginInstanceImpl* instance) OVERRIDE; 31 virtual void InstanceDeleted(PepperPluginInstanceImpl* instance) OVERRIDE;
33 virtual bool AsyncOpenFile(const base::FilePath& path, 32 virtual bool AsyncOpenFile(const base::FilePath& path,
34 int flags, 33 int flags,
35 const AsyncOpenFileCallback& callback) OVERRIDE; 34 const AsyncOpenFileCallback& callback) OVERRIDE;
36 virtual scoped_refptr<base::MessageLoopProxy> 35 virtual scoped_refptr<base::MessageLoopProxy>
37 GetFileThreadMessageLoopProxy() OVERRIDE; 36 GetFileThreadMessageLoopProxy() OVERRIDE;
38 virtual uint32 TCPSocketCreate() OVERRIDE; 37
39 virtual void TCPSocketConnect(PPB_TCPSocket_Private_Impl* socket,
40 uint32 socket_id,
41 const std::string& host,
42 uint16_t port) OVERRIDE;
43 virtual void TCPSocketConnectWithNetAddress(
44 PPB_TCPSocket_Private_Impl* socket,
45 uint32 socket_id,
46 const PP_NetAddress_Private& addr) OVERRIDE;
47 virtual void TCPSocketSSLHandshake(
48 uint32 socket_id,
49 const std::string& server_name,
50 uint16_t server_port,
51 const std::vector<std::vector<char> >& trusted_certs,
52 const std::vector<std::vector<char> >& untrusted_certs) OVERRIDE;
53 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read) OVERRIDE;
54 virtual void TCPSocketWrite(uint32 socket_id,
55 const std::string& buffer) OVERRIDE;
56 virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE;
57 virtual void TCPSocketSetOption(
58 uint32 socket_id,
59 PP_TCPSocket_Option name,
60 const ::ppapi::SocketOptionData& value) OVERRIDE;
61 virtual void RegisterTCPSocket(PPB_TCPSocket_Private_Impl* socket,
62 uint32 socket_id) OVERRIDE;
63 virtual void TCPServerSocketListen(PP_Resource socket_resource,
64 const PP_NetAddress_Private& addr,
65 int32_t backlog) OVERRIDE;
66 virtual void TCPServerSocketAccept(uint32 server_socket_id) OVERRIDE;
67 virtual void TCPServerSocketStopListening(PP_Resource socket_resource,
68 uint32 socket_id) OVERRIDE;
69 // Add/remove a network list observer. 38 // Add/remove a network list observer.
70 virtual bool LockMouse(PepperPluginInstanceImpl* instance) OVERRIDE;
71 virtual void UnlockMouse(PepperPluginInstanceImpl* instance) OVERRIDE;
72 virtual bool IsMouseLocked(PepperPluginInstanceImpl* instance) OVERRIDE;
73 virtual void DidChangeCursor(PepperPluginInstanceImpl* instance,
74 const WebKit::WebCursorInfo& cursor) OVERRIDE;
75 virtual void DidReceiveMouseEvent(
76 PepperPluginInstanceImpl* instance) OVERRIDE;
77 virtual void SampleGamepads(WebKit::WebGamepads* data) OVERRIDE; 39 virtual void SampleGamepads(WebKit::WebGamepads* data) OVERRIDE;
78 virtual void HandleDocumentLoad( 40 virtual void HandleDocumentLoad(
79 PepperPluginInstanceImpl* instance, 41 PepperPluginInstanceImpl* instance,
80 const WebKit::WebURLResponse& response) OVERRIDE; 42 const WebKit::WebURLResponse& response) OVERRIDE;
81 virtual RendererPpapiHost* CreateExternalPluginModule( 43 virtual RendererPpapiHost* CreateExternalPluginModule(
82 scoped_refptr<PluginModule> module, 44 scoped_refptr<PluginModule> module,
83 const base::FilePath& path, 45 const base::FilePath& path,
84 ::ppapi::PpapiPermissions permissions, 46 ::ppapi::PpapiPermissions permissions,
85 const IPC::ChannelHandle& channel_handle, 47 const IPC::ChannelHandle& channel_handle,
86 base::ProcessId plugin_pid, 48 base::ProcessId plugin_pid,
87 int plugin_child_id) OVERRIDE; 49 int plugin_child_id) OVERRIDE;
88 }; 50 };
89 51
90 } // namespace content 52 } // namespace content
91 53
92 #endif // CONTENT_RENDERER_PEPPER_MOCK_PLUGIN_DELEGATE_H_ 54 #endif // CONTENT_RENDERER_PEPPER_MOCK_PLUGIN_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698