OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/plugin_filter.h" |
9 #include "content/browser/webui/empty_web_ui_factory.h" | 10 #include "content/browser/webui/empty_web_ui_factory.h" |
10 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
11 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
12 #include "ui/base/clipboard/clipboard.h" | 13 #include "ui/base/clipboard/clipboard.h" |
13 #include "webkit/glue/webpreferences.h" | 14 #include "webkit/glue/webpreferences.h" |
14 | 15 |
| 16 namespace { |
| 17 |
| 18 class DummyPluginFilter : public content::PluginFilter { |
| 19 public: |
| 20 DummyPluginFilter() {} |
| 21 |
| 22 virtual bool ShouldUsePlugin(webkit::npapi::WebPluginInfo* plugin) OVERRIDE { |
| 23 return true; |
| 24 } |
| 25 }; |
| 26 |
| 27 } // namespace |
| 28 |
15 namespace content { | 29 namespace content { |
16 | 30 |
17 MockContentBrowserClient::~MockContentBrowserClient() { | 31 MockContentBrowserClient::~MockContentBrowserClient() { |
18 } | 32 } |
19 | 33 |
20 void MockContentBrowserClient::RenderViewHostCreated( | 34 void MockContentBrowserClient::RenderViewHostCreated( |
21 RenderViewHost* render_view_host) { | 35 RenderViewHost* render_view_host) { |
22 } | 36 } |
23 | 37 |
24 void MockContentBrowserClient::BrowserRenderProcessHostCreated( | 38 void MockContentBrowserClient::BrowserRenderProcessHostCreated( |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 int render_view_id, | 107 int render_view_id, |
94 net::CookieOptions* options) { | 108 net::CookieOptions* options) { |
95 return true; | 109 return true; |
96 } | 110 } |
97 | 111 |
98 bool MockContentBrowserClient::AllowSaveLocalState( | 112 bool MockContentBrowserClient::AllowSaveLocalState( |
99 const content::ResourceContext& context) { | 113 const content::ResourceContext& context) { |
100 return true; | 114 return true; |
101 } | 115 } |
102 | 116 |
| 117 content::PluginFilter* MockContentBrowserClient::CreatePluginFilter( |
| 118 int render_process_id, |
| 119 int render_view_id, |
| 120 const content::ResourceContext& context, |
| 121 const GURL& url, |
| 122 const GURL& policy_url) { |
| 123 return new DummyPluginFilter(); |
| 124 } |
| 125 |
103 QuotaPermissionContext* | 126 QuotaPermissionContext* |
104 MockContentBrowserClient::CreateQuotaPermissionContext() { | 127 MockContentBrowserClient::CreateQuotaPermissionContext() { |
105 return NULL; | 128 return NULL; |
106 } | 129 } |
107 | 130 |
108 net::URLRequestContext* MockContentBrowserClient::OverrideRequestContextForURL( | 131 net::URLRequestContext* MockContentBrowserClient::OverrideRequestContextForURL( |
109 const GURL& url, const content::ResourceContext& context) { | 132 const GURL& url, const content::ResourceContext& context) { |
110 return NULL; | 133 return NULL; |
111 } | 134 } |
112 | 135 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 #endif | 250 #endif |
228 | 251 |
229 #if defined(USE_NSS) | 252 #if defined(USE_NSS) |
230 crypto::CryptoModuleBlockingPasswordDelegate* | 253 crypto::CryptoModuleBlockingPasswordDelegate* |
231 MockContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { | 254 MockContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { |
232 return NULL; | 255 return NULL; |
233 } | 256 } |
234 #endif | 257 #endif |
235 | 258 |
236 } // namespace content | 259 } // namespace content |
OLD | NEW |