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

Side by Side Diff: webkit/glue/plugins/mock_plugin_delegate.cc

Issue 5685002: Make it possible to write simple unit tests for the pepper implementation. Th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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 #include "webkit/glue/plugins/mock_plugin_delegate.h"
6
7 #include "base/message_loop_proxy.h"
8
9 namespace pepper {
10
11 MockPluginDelegate::MockPluginDelegate() {
12 }
13
14 MockPluginDelegate::~MockPluginDelegate() {
15 }
16
17 void MockPluginDelegate::InstanceCreated(pepper::PluginInstance* instance) {
18 }
19
20 void MockPluginDelegate::InstanceDeleted(pepper::PluginInstance* instance) {
21 }
22
23 MockPluginDelegate::PlatformImage2D* MockPluginDelegate::CreateImage2D(
24 int width,
25 int height) {
26 return NULL;
27 }
28
29 MockPluginDelegate::PlatformContext3D* MockPluginDelegate::CreateContext3D() {
30 return NULL;
31 }
32
33 MockPluginDelegate::PlatformVideoDecoder*
34 MockPluginDelegate::CreateVideoDecoder(
35 const PP_VideoDecoderConfig_Dev& decoder_config) {
36 return NULL;
37 }
38
39 MockPluginDelegate::PlatformAudio* MockPluginDelegate::CreateAudio(
40 uint32_t sample_rate,
41 uint32_t sample_count,
42 PlatformAudio::Client* client) {
43 return NULL;
44 }
45
46 void MockPluginDelegate::NumberOfFindResultsChanged(int identifier,
47 int total,
48 bool final_result) {
49 }
50
51 void MockPluginDelegate::SelectedFindResultChanged(int identifier, int index) {
52 }
53
54 bool MockPluginDelegate::RunFileChooser(
55 const WebKit::WebFileChooserParams& params,
56 WebKit::WebFileChooserCompletion* chooser_completion) {
57 return false;
58 }
59
60 bool MockPluginDelegate::AsyncOpenFile(const FilePath& path,
61 int flags,
62 AsyncOpenFileCallback* callback) {
63 return false;
64 }
65
66 bool MockPluginDelegate::OpenFileSystem(
67 const GURL& url,
68 fileapi::FileSystemType type,
69 long long size,
70 fileapi::FileSystemCallbackDispatcher* dispatcher) {
71 return false;
72 }
73
74 bool MockPluginDelegate::MakeDirectory(
75 const FilePath& path,
76 bool recursive,
77 fileapi::FileSystemCallbackDispatcher* dispatcher) {
78 return false;
79 }
80
81 bool MockPluginDelegate::Query(
82 const FilePath& path,
83 fileapi::FileSystemCallbackDispatcher* dispatcher) {
84 return false;
85 }
86
87 bool MockPluginDelegate::Touch(
88 const FilePath& path,
89 const base::Time& last_access_time,
90 const base::Time& last_modified_time,
91 fileapi::FileSystemCallbackDispatcher* dispatcher) {
92 return false;
93 }
94
95 bool MockPluginDelegate::Delete(
96 const FilePath& path,
97 fileapi::FileSystemCallbackDispatcher* dispatcher) {
98 return false;
99 }
100
101 bool MockPluginDelegate::Rename(
102 const FilePath& file_path,
103 const FilePath& new_file_path,
104 fileapi::FileSystemCallbackDispatcher* dispatcher) {
105 return false;
106 }
107
108 bool MockPluginDelegate::ReadDirectory(
109 const FilePath& directory_path,
110 fileapi::FileSystemCallbackDispatcher* dispatcher) {
111 return false;
112 }
113
114 base::PlatformFileError MockPluginDelegate::OpenModuleLocalFile(
115 const std::string& module_name,
116 const FilePath& path,
117 int flags,
118 base::PlatformFile* file) {
119 return base::PLATFORM_FILE_ERROR_FAILED;
120 }
121
122 base::PlatformFileError MockPluginDelegate::RenameModuleLocalFile(
123 const std::string& module_name,
124 const FilePath& path_from,
125 const FilePath& path_to) {
126 return base::PLATFORM_FILE_ERROR_FAILED;
127 }
128
129 base::PlatformFileError MockPluginDelegate::DeleteModuleLocalFileOrDir(
130 const std::string& module_name,
131 const FilePath& path,
132 bool recursive) {
133 return base::PLATFORM_FILE_ERROR_FAILED;
134 }
135
136 base::PlatformFileError MockPluginDelegate::CreateModuleLocalDir(
137 const std::string& module_name,
138 const FilePath& path) {
139 return base::PLATFORM_FILE_ERROR_FAILED;
140 }
141
142 base::PlatformFileError MockPluginDelegate::QueryModuleLocalFile(
143 const std::string& module_name,
144 const FilePath& path,
145 base::PlatformFileInfo* info) {
146 return base::PLATFORM_FILE_ERROR_FAILED;
147 }
148
149 base::PlatformFileError MockPluginDelegate::GetModuleLocalDirContents(
150 const std::string& module_name,
151 const FilePath& path,
152 PepperDirContents* contents) {
153 return base::PLATFORM_FILE_ERROR_FAILED;
154 }
155
156 scoped_refptr<base::MessageLoopProxy>
157 MockPluginDelegate::GetFileThreadMessageLoopProxy() {
158 return scoped_refptr<base::MessageLoopProxy>();
159 }
160
161 FullscreenContainer* MockPluginDelegate::CreateFullscreenContainer(
162 PluginInstance* instance) {
163 return NULL;
164 }
165
166 std::string MockPluginDelegate::GetDefaultEncoding() {
167 return "iso-8859-1";
168 }
169
170 void MockPluginDelegate::ZoomLimitsChanged(double minimum_factor,
171 double maximum_factor) {
172 }
173
174 std::string MockPluginDelegate::ResolveProxy(const GURL& url) {
175 return std::string();
176 }
177
178 void MockPluginDelegate::DidStartLoading() {
179 }
180
181 void MockPluginDelegate::DidStopLoading() {
182 }
183
184 void MockPluginDelegate::SetContentRestriction(int restrictions) {
185 }
186
187 } // namespace pepper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698