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