OLD | NEW |
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 #include "content/browser/mock_content_browser_client.h" | 5 #include "content/browser/mock_content_browser_client.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 return std::string(); | 95 return std::string(); |
96 } | 96 } |
97 | 97 |
98 SkBitmap* MockContentBrowserClient::GetDefaultFavicon() { | 98 SkBitmap* MockContentBrowserClient::GetDefaultFavicon() { |
99 static SkBitmap empty; | 99 static SkBitmap empty; |
100 return ∅ | 100 return ∅ |
101 } | 101 } |
102 | 102 |
103 bool MockContentBrowserClient::AllowAppCache( | 103 bool MockContentBrowserClient::AllowAppCache( |
104 const GURL& manifest_url, const GURL& first_party, | 104 const GURL& manifest_url, const GURL& first_party, |
105 const content::ResourceContext& context) { | 105 content::ResourceContext* context) { |
106 return true; | 106 return true; |
107 } | 107 } |
108 | 108 |
109 bool MockContentBrowserClient::AllowGetCookie( | 109 bool MockContentBrowserClient::AllowGetCookie( |
110 const GURL& url, | 110 const GURL& url, |
111 const GURL& first_party, | 111 const GURL& first_party, |
112 const net::CookieList& cookie_list, | 112 const net::CookieList& cookie_list, |
113 const content::ResourceContext& context, | 113 content::ResourceContext* context, |
114 int render_process_id, | 114 int render_process_id, |
115 int render_view_id) { | 115 int render_view_id) { |
116 return true; | 116 return true; |
117 } | 117 } |
118 | 118 |
119 bool MockContentBrowserClient::AllowSetCookie( | 119 bool MockContentBrowserClient::AllowSetCookie( |
120 const GURL& url, | 120 const GURL& url, |
121 const GURL& first_party, | 121 const GURL& first_party, |
122 const std::string& cookie_line, | 122 const std::string& cookie_line, |
123 const content::ResourceContext& context, | 123 content::ResourceContext* context, |
124 int render_process_id, | 124 int render_process_id, |
125 int render_view_id, | 125 int render_view_id, |
126 net::CookieOptions* options) { | 126 net::CookieOptions* options) { |
127 return true; | 127 return true; |
128 } | 128 } |
129 | 129 |
130 bool MockContentBrowserClient::AllowSaveLocalState( | 130 bool MockContentBrowserClient::AllowSaveLocalState( |
131 const content::ResourceContext& context) { | 131 content::ResourceContext* context) { |
132 return true; | 132 return true; |
133 } | 133 } |
134 | 134 |
135 bool MockContentBrowserClient::AllowWorkerDatabase( | 135 bool MockContentBrowserClient::AllowWorkerDatabase( |
136 const GURL& url, | 136 const GURL& url, |
137 const string16& name, | 137 const string16& name, |
138 const string16& display_name, | 138 const string16& display_name, |
139 unsigned long estimated_size, | 139 unsigned long estimated_size, |
140 const content::ResourceContext& context, | 140 content::ResourceContext* context, |
141 const std::vector<std::pair<int, int> >& render_views) { | 141 const std::vector<std::pair<int, int> >& render_views) { |
142 return true; | 142 return true; |
143 } | 143 } |
144 | 144 |
145 bool MockContentBrowserClient::AllowWorkerFileSystem( | 145 bool MockContentBrowserClient::AllowWorkerFileSystem( |
146 const GURL& url, | 146 const GURL& url, |
147 const content::ResourceContext& context, | 147 content::ResourceContext* context, |
148 const std::vector<std::pair<int, int> >& render_views) { | 148 const std::vector<std::pair<int, int> >& render_views) { |
149 return true; | 149 return true; |
150 } | 150 } |
151 | 151 |
152 QuotaPermissionContext* | 152 QuotaPermissionContext* |
153 MockContentBrowserClient::CreateQuotaPermissionContext() { | 153 MockContentBrowserClient::CreateQuotaPermissionContext() { |
154 return NULL; | 154 return NULL; |
155 } | 155 } |
156 | 156 |
157 net::URLRequestContext* MockContentBrowserClient::OverrideRequestContextForURL( | 157 net::URLRequestContext* MockContentBrowserClient::OverrideRequestContextForURL( |
158 const GURL& url, const content::ResourceContext& context) { | 158 const GURL& url, content::ResourceContext* context) { |
159 return NULL; | 159 return NULL; |
160 } | 160 } |
161 | 161 |
162 void MockContentBrowserClient::OpenItem(const FilePath& path) { | 162 void MockContentBrowserClient::OpenItem(const FilePath& path) { |
163 } | 163 } |
164 | 164 |
165 void MockContentBrowserClient::ShowItemInFolder(const FilePath& path) { | 165 void MockContentBrowserClient::ShowItemInFolder(const FilePath& path) { |
166 } | 166 } |
167 | 167 |
168 void MockContentBrowserClient::AllowCertificateError( | 168 void MockContentBrowserClient::AllowCertificateError( |
(...skipping 18 matching lines...) Expand all Loading... |
187 void MockContentBrowserClient::RequestDesktopNotificationPermission( | 187 void MockContentBrowserClient::RequestDesktopNotificationPermission( |
188 const GURL& source_origin, | 188 const GURL& source_origin, |
189 int callback_context, | 189 int callback_context, |
190 int render_process_id, | 190 int render_process_id, |
191 int render_view_id) { | 191 int render_view_id) { |
192 } | 192 } |
193 | 193 |
194 WebKit::WebNotificationPresenter::Permission | 194 WebKit::WebNotificationPresenter::Permission |
195 MockContentBrowserClient::CheckDesktopNotificationPermission( | 195 MockContentBrowserClient::CheckDesktopNotificationPermission( |
196 const GURL& source_origin, | 196 const GURL& source_origin, |
197 const content::ResourceContext& context, | 197 content::ResourceContext* context, |
198 int render_process_id) { | 198 int render_process_id) { |
199 return WebKit::WebNotificationPresenter::PermissionAllowed; | 199 return WebKit::WebNotificationPresenter::PermissionAllowed; |
200 } | 200 } |
201 | 201 |
202 void MockContentBrowserClient::ShowDesktopNotification( | 202 void MockContentBrowserClient::ShowDesktopNotification( |
203 const content::ShowDesktopNotificationHostMsgParams& params, | 203 const content::ShowDesktopNotificationHostMsgParams& params, |
204 int render_process_id, | 204 int render_process_id, |
205 int render_view_id, | 205 int render_view_id, |
206 bool worker) { | 206 bool worker) { |
207 } | 207 } |
208 | 208 |
209 void MockContentBrowserClient::CancelDesktopNotification( | 209 void MockContentBrowserClient::CancelDesktopNotification( |
210 int render_process_id, | 210 int render_process_id, |
211 int render_view_id, | 211 int render_view_id, |
212 int notification_id) { | 212 int notification_id) { |
213 } | 213 } |
214 | 214 |
215 bool MockContentBrowserClient::CanCreateWindow( | 215 bool MockContentBrowserClient::CanCreateWindow( |
216 const GURL& source_origin, | 216 const GURL& source_origin, |
217 WindowContainerType container_type, | 217 WindowContainerType container_type, |
218 const content::ResourceContext& context, | 218 content::ResourceContext* context, |
219 int render_process_id) { | 219 int render_process_id) { |
220 return true; | 220 return true; |
221 } | 221 } |
222 | 222 |
223 std::string MockContentBrowserClient::GetWorkerProcessTitle( | 223 std::string MockContentBrowserClient::GetWorkerProcessTitle( |
224 const GURL& url, const content::ResourceContext& context) { | 224 const GURL& url, content::ResourceContext* context) { |
225 return std::string(); | 225 return std::string(); |
226 } | 226 } |
227 | 227 |
228 void MockContentBrowserClient::ResourceDispatcherHostCreated() { | 228 void MockContentBrowserClient::ResourceDispatcherHostCreated() { |
229 } | 229 } |
230 | 230 |
231 ui::Clipboard* MockContentBrowserClient::GetClipboard() { | 231 ui::Clipboard* MockContentBrowserClient::GetClipboard() { |
232 static ui::Clipboard clipboard; | 232 static ui::Clipboard clipboard; |
233 return &clipboard; | 233 return &clipboard; |
234 } | 234 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 #endif | 301 #endif |
302 | 302 |
303 #if defined(USE_NSS) | 303 #if defined(USE_NSS) |
304 crypto::CryptoModuleBlockingPasswordDelegate* | 304 crypto::CryptoModuleBlockingPasswordDelegate* |
305 MockContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { | 305 MockContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { |
306 return NULL; | 306 return NULL; |
307 } | 307 } |
308 #endif | 308 #endif |
309 | 309 |
310 } // namespace content | 310 } // namespace content |
OLD | NEW |