Disable content detection tests on Android
[chromium-blink-merge.git] / webkit / plugins / ppapi / mock_plugin_delegate.h
blobde4c28f67336b070fb1606694259de891baf9514
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.
5 #ifndef WEBKIT_PLUGINS_PPAPI_MOCK_PLUGIN_DELEGATE_H_
6 #define WEBKIT_PLUGINS_PPAPI_MOCK_PLUGIN_DELEGATE_H_
8 #include "webkit/plugins/ppapi/plugin_delegate.h"
10 struct PP_NetAddress_Private;
11 namespace ppapi { class PPB_X509Certificate_Fields; }
13 namespace webkit {
14 namespace ppapi {
16 class MockPluginDelegate : public PluginDelegate {
17 public:
18 MockPluginDelegate();
19 virtual ~MockPluginDelegate();
21 virtual void PluginFocusChanged(PluginInstance* instance, bool focused);
22 virtual void PluginTextInputTypeChanged(PluginInstance* instance);
23 virtual void PluginCaretPositionChanged(PluginInstance* instance);
24 virtual void PluginRequestedCancelComposition(PluginInstance* instance);
25 virtual void PluginSelectionChanged(PluginInstance* instance);
26 virtual void SimulateImeSetComposition(
27 const string16& text,
28 const std::vector<WebKit::WebCompositionUnderline>& underlines,
29 int selection_start,
30 int selection_end);
31 virtual void SimulateImeConfirmComposition(const string16& text);
32 virtual void PluginCrashed(PluginInstance* instance);
33 virtual void InstanceCreated(PluginInstance* instance);
34 virtual void InstanceDeleted(PluginInstance* instance);
35 virtual scoped_ptr< ::ppapi::thunk::ResourceCreationAPI>
36 CreateResourceCreationAPI(PluginInstance* instance);
37 virtual SkBitmap* GetSadPluginBitmap();
38 virtual WebKit::WebPlugin* CreatePluginReplacement(const FilePath& file_path);
39 virtual PlatformImage2D* CreateImage2D(int width, int height);
40 virtual PlatformGraphics2D* GetGraphics2D(PluginInstance* instance,
41 PP_Resource graphics_2d);
42 virtual PlatformContext3D* CreateContext3D();
43 virtual void ReparentContext(PlatformContext3D*);
44 virtual PlatformVideoDecoder* CreateVideoDecoder(
45 media::VideoDecodeAccelerator::Client* client,
46 int32 command_buffer_route_id);
47 virtual PlatformVideoCapture* CreateVideoCapture(
48 const std::string& device_id,
49 PlatformVideoCaptureEventHandler* handler);
50 virtual uint32_t GetAudioHardwareOutputSampleRate();
51 virtual uint32_t GetAudioHardwareOutputBufferSize();
52 virtual PlatformAudioOutput* CreateAudioOutput(
53 uint32_t sample_rate,
54 uint32_t sample_count,
55 PlatformAudioOutputClient* client);
56 virtual PlatformAudioInput* CreateAudioInput(
57 const std::string& device_id,
58 uint32_t sample_rate,
59 uint32_t sample_count,
60 PlatformAudioInputClient* client);
61 virtual Broker* ConnectToBroker(PPB_Broker_Impl* client);
62 virtual void NumberOfFindResultsChanged(int identifier,
63 int total,
64 bool final_result);
65 virtual void SelectedFindResultChanged(int identifier, int index);
66 virtual bool AsyncOpenFile(const FilePath& path,
67 int flags,
68 const AsyncOpenFileCallback& callback);
69 virtual bool AsyncOpenFileSystemURL(
70 const GURL& path,
71 int flags,
72 const AsyncOpenFileSystemURLCallback& callback);
73 virtual bool OpenFileSystem(
74 const GURL& origin_url,
75 fileapi::FileSystemType type,
76 long long size,
77 fileapi::FileSystemCallbackDispatcher* dispatcher);
78 virtual bool MakeDirectory(
79 const GURL& path,
80 bool recursive,
81 fileapi::FileSystemCallbackDispatcher* dispatcher);
82 virtual bool Query(const GURL& path,
83 fileapi::FileSystemCallbackDispatcher* dispatcher);
84 virtual bool Touch(const GURL& path,
85 const base::Time& last_access_time,
86 const base::Time& last_modified_time,
87 fileapi::FileSystemCallbackDispatcher* dispatcher);
88 virtual bool SetLength(const GURL& path,
89 int64_t length,
90 fileapi::FileSystemCallbackDispatcher* dispatcher);
91 virtual bool Delete(const GURL& path,
92 fileapi::FileSystemCallbackDispatcher* dispatcher);
93 virtual bool Rename(const GURL& file_path,
94 const GURL& new_file_path,
95 fileapi::FileSystemCallbackDispatcher* dispatcher);
96 virtual bool ReadDirectory(
97 const GURL& directory_path,
98 fileapi::FileSystemCallbackDispatcher* dispatcher);
99 virtual void QueryAvailableSpace(const GURL& origin,
100 quota::StorageType type,
101 const AvailableSpaceCallback& callback);
102 virtual void WillUpdateFile(const GURL& file_path);
103 virtual void DidUpdateFile(const GURL& file_path, int64_t delta);
104 virtual void SyncGetFileSystemPlatformPath(const GURL& url,
105 FilePath* platform_path);
106 virtual scoped_refptr<base::MessageLoopProxy>
107 GetFileThreadMessageLoopProxy();
108 virtual uint32 TCPSocketCreate();
109 virtual void TCPSocketConnect(PPB_TCPSocket_Private_Impl* socket,
110 uint32 socket_id,
111 const std::string& host,
112 uint16_t port);
113 virtual void TCPSocketConnectWithNetAddress(
114 PPB_TCPSocket_Private_Impl* socket,
115 uint32 socket_id,
116 const PP_NetAddress_Private& addr);
117 virtual void TCPSocketSSLHandshake(
118 uint32 socket_id,
119 const std::string& server_name,
120 uint16_t server_port,
121 const std::vector<std::vector<char> >& trusted_certs,
122 const std::vector<std::vector<char> >& untrusted_certs);
123 virtual void TCPSocketRead(uint32 socket_id, int32_t bytes_to_read);
124 virtual void TCPSocketWrite(uint32 socket_id, const std::string& buffer);
125 virtual void TCPSocketDisconnect(uint32 socket_id);
126 virtual void RegisterTCPSocket(PPB_TCPSocket_Private_Impl* socket,
127 uint32 socket_id);
128 virtual void TCPServerSocketListen(PP_Resource socket_resource,
129 const PP_NetAddress_Private& addr,
130 int32_t backlog);
131 virtual void TCPServerSocketAccept(uint32 server_socket_id);
132 virtual void TCPServerSocketStopListening(PP_Resource socket_resource,
133 uint32 socket_id);
134 virtual void RegisterHostResolver(
135 ::ppapi::PPB_HostResolver_Shared* host_resolver,
136 uint32 host_resolver_id);
137 virtual void HostResolverResolve(
138 uint32 host_resolver_id,
139 const ::ppapi::HostPortPair& host_port,
140 const PP_HostResolver_Private_Hint* hint);
141 virtual void UnregisterHostResolver(uint32 host_resolver_id);
142 // Add/remove a network list observer.
143 virtual bool AddNetworkListObserver(
144 webkit_glue::NetworkListObserver* observer) OVERRIDE;
145 virtual void RemoveNetworkListObserver(
146 webkit_glue::NetworkListObserver* observer) OVERRIDE;
147 virtual bool X509CertificateParseDER(
148 const std::vector<char>& der,
149 ::ppapi::PPB_X509Certificate_Fields* fields);
150 virtual FullscreenContainer* CreateFullscreenContainer(
151 PluginInstance* instance);
152 virtual gfx::Size GetScreenSize();
153 virtual std::string GetDefaultEncoding();
154 virtual void ZoomLimitsChanged(double minimum_factor,
155 double maximum_factor);
156 virtual void DidStartLoading();
157 virtual void DidStopLoading();
158 virtual void SetContentRestriction(int restrictions);
159 virtual void SaveURLAs(const GURL& url);
160 virtual base::SharedMemory* CreateAnonymousSharedMemory(size_t size);
161 virtual ::ppapi::Preferences GetPreferences();
162 virtual bool LockMouse(PluginInstance* instance);
163 virtual void UnlockMouse(PluginInstance* instance);
164 virtual bool IsMouseLocked(PluginInstance* instance);
165 virtual void DidChangeCursor(PluginInstance* instance,
166 const WebKit::WebCursorInfo& cursor);
167 virtual void DidReceiveMouseEvent(PluginInstance* instance);
168 virtual void SampleGamepads(WebKit::WebGamepads* data) OVERRIDE;
169 virtual bool IsInFullscreenMode();
170 virtual bool IsPageVisible() const;
171 virtual int EnumerateDevices(PP_DeviceType_Dev type,
172 const EnumerateDevicesCallback& callback);
173 virtual void StopEnumerateDevices(int request_id);
176 } // namespace ppapi
177 } // namespace webkit
179 #endif // WEBKIT_PLUGINS_PPAPI_MOCK_PLUGIN_DELEGATE_H_