OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 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 WEBKIT_GLUE_PLUGINS_MOCK_PLUGIN_DELEGATE_H_ | |
6 #define WEBKIT_GLUE_PLUGINS_MOCK_PLUGIN_DELEGATE_H_ | |
7 | |
8 #include "webkit/glue/plugins/pepper_plugin_delegate.h" | |
9 | |
10 namespace pepper { | |
11 | |
12 class MockPluginDelegate : public PluginDelegate { | |
13 public: | |
14 MockPluginDelegate(); | |
15 ~MockPluginDelegate(); | |
16 | |
17 virtual void InstanceCreated(pepper::PluginInstance* instance); | |
18 virtual void InstanceDeleted(pepper::PluginInstance* instance); | |
19 virtual PlatformImage2D* CreateImage2D(int width, int height); | |
20 virtual PlatformContext3D* CreateContext3D(); | |
21 virtual PlatformVideoDecoder* CreateVideoDecoder( | |
22 const PP_VideoDecoderConfig_Dev& decoder_config); | |
23 virtual PlatformAudio* CreateAudio(uint32_t sample_rate, | |
24 uint32_t sample_count, | |
25 PlatformAudio::Client* client); | |
26 virtual void NumberOfFindResultsChanged(int identifier, | |
27 int total, | |
28 bool final_result); | |
29 virtual void SelectedFindResultChanged(int identifier, int index); | |
30 virtual bool RunFileChooser( | |
31 const WebKit::WebFileChooserParams& params, | |
32 WebKit::WebFileChooserCompletion* chooser_completion); | |
33 virtual bool AsyncOpenFile(const FilePath& path, | |
34 int flags, | |
35 AsyncOpenFileCallback* callback); | |
36 virtual bool OpenFileSystem( | |
37 const GURL& url, | |
38 fileapi::FileSystemType type, | |
39 long long size, | |
40 fileapi::FileSystemCallbackDispatcher* dispatcher); | |
41 virtual bool MakeDirectory( | |
42 const FilePath& path, | |
43 bool recursive, | |
44 fileapi::FileSystemCallbackDispatcher* dispatcher); | |
45 virtual bool Query(const FilePath& path, | |
46 fileapi::FileSystemCallbackDispatcher* dispatcher); | |
47 virtual bool Touch(const FilePath& path, | |
48 const base::Time& last_access_time, | |
49 const base::Time& last_modified_time, | |
50 fileapi::FileSystemCallbackDispatcher* dispatcher); | |
51 virtual bool Delete(const FilePath& path, | |
52 fileapi::FileSystemCallbackDispatcher* dispatcher); | |
53 virtual bool Rename(const FilePath& file_path, | |
54 const FilePath& new_file_path, | |
55 fileapi::FileSystemCallbackDispatcher* dispatcher); | |
56 virtual bool ReadDirectory( | |
57 const FilePath& directory_path, | |
58 fileapi::FileSystemCallbackDispatcher* dispatcher); | |
59 virtual base::PlatformFileError OpenModuleLocalFile( | |
60 const std::string& module_name, | |
61 const FilePath& path, | |
62 int flags, | |
63 base::PlatformFile* file); | |
64 virtual base::PlatformFileError RenameModuleLocalFile( | |
65 const std::string& module_name, | |
66 const FilePath& path_from, | |
67 const FilePath& path_to); | |
68 virtual base::PlatformFileError DeleteModuleLocalFileOrDir( | |
69 const std::string& module_name, | |
70 const FilePath& path, | |
71 bool recursive); | |
72 virtual base::PlatformFileError CreateModuleLocalDir( | |
73 const std::string& module_name, | |
74 const FilePath& path); | |
75 virtual base::PlatformFileError QueryModuleLocalFile( | |
76 const std::string& module_name, | |
77 const FilePath& path, | |
78 base::PlatformFileInfo* info); | |
79 virtual base::PlatformFileError GetModuleLocalDirContents( | |
80 const std::string& module_name, | |
81 const FilePath& path, | |
82 PepperDirContents* contents); | |
83 virtual scoped_refptr<base::MessageLoopProxy> | |
84 GetFileThreadMessageLoopProxy(); | |
85 virtual FullscreenContainer* CreateFullscreenContainer( | |
86 PluginInstance* instance); | |
87 virtual std::string GetDefaultEncoding(); | |
88 virtual void ZoomLimitsChanged(double minimum_factor, | |
89 double maximum_factor); | |
90 virtual std::string ResolveProxy(const GURL& url); | |
91 virtual void DidStartLoading(); | |
92 virtual void DidStopLoading(); | |
93 virtual void SetContentRestriction(int restrictions); | |
94 }; | |
95 | |
96 } // namespace pepper | |
97 | |
98 #endif // WEBKIT_GLUE_PLUGINS_MOCK_PLUGIN_DELEGATE_H_ | |
OLD | NEW |