summaryrefslogtreecommitdiffstats
path: root/content/browser/mock_content_browser_client.h
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-29 02:06:28 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-29 02:06:28 +0000
commita77e4bc20e8a54ab4297c7961439d3c115abb71d (patch)
tree4a315810c709b75342c3a07b54dc4ac424e6d87f /content/browser/mock_content_browser_client.h
parent3ee39623d21e7241af1359f7d8b7ef199e206db0 (diff)
downloadchromium_src-a77e4bc20e8a54ab4297c7961439d3c115abb71d.zip
chromium_src-a77e4bc20e8a54ab4297c7961439d3c115abb71d.tar.gz
chromium_src-a77e4bc20e8a54ab4297c7961439d3c115abb71d.tar.bz2
Make all content client interfaces pure virtual.
BUG=87332 TEST=existing Review URL: http://codereview.chromium.org/7242016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/mock_content_browser_client.h')
-rw-r--r--content/browser/mock_content_browser_client.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/content/browser/mock_content_browser_client.h b/content/browser/mock_content_browser_client.h
new file mode 100644
index 0000000..b63e906
--- /dev/null
+++ b/content/browser/mock_content_browser_client.h
@@ -0,0 +1,105 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_
+#define CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_
+#pragma once
+
+#include "base/compiler_specific.h"
+#include "content/browser/content_browser_client.h"
+
+namespace content {
+
+// Base for unit tests that need to mock the ContentBrowserClient.
+class MockContentBrowserClient : public ContentBrowserClient {
+ public:
+ virtual ~MockContentBrowserClient();
+
+ virtual void RenderViewHostCreated(
+ RenderViewHost* render_view_host) OVERRIDE;
+ virtual void BrowserRenderProcessHostCreated(
+ BrowserRenderProcessHost* host) OVERRIDE;
+ virtual void PluginProcessHostCreated(PluginProcessHost* host) OVERRIDE;
+ virtual void WorkerProcessHostCreated(WorkerProcessHost* host) OVERRIDE;
+ virtual WebUIFactory* GetWebUIFactory() OVERRIDE;
+ virtual GURL GetEffectiveURL(Profile* profile, const GURL& url) OVERRIDE;
+ virtual bool IsURLSameAsAnySiteInstance(const GURL& url) OVERRIDE;
+ virtual std::string GetCanonicalEncodingNameByAliasName(
+ const std::string& alias_name) OVERRIDE;
+ virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
+ int child_process_id) OVERRIDE;
+ virtual std::string GetApplicationLocale() OVERRIDE;
+ virtual std::string GetAcceptLangs(const TabContents* tab) OVERRIDE;
+ virtual SkBitmap* GetDefaultFavicon() OVERRIDE;
+ virtual bool AllowAppCache(const GURL& manifest_url,
+ const content::ResourceContext& context) OVERRIDE;
+ virtual bool AllowGetCookie(const GURL& url,
+ const GURL& first_party,
+ const net::CookieList& cookie_list,
+ const content::ResourceContext& context,
+ int render_process_id,
+ int render_view_id) OVERRIDE;
+ virtual bool AllowSetCookie(const GURL& url,
+ const GURL& first_party,
+ const std::string& cookie_line,
+ const content::ResourceContext& context,
+ int render_process_id,
+ int render_view_id,
+ net::CookieOptions* options) OVERRIDE;
+ virtual QuotaPermissionContext* CreateQuotaPermissionContext() OVERRIDE;
+ virtual void RevealFolderInOS(const FilePath& path) OVERRIDE;
+ virtual void AllowCertificateError(
+ SSLCertErrorHandler* handler,
+ bool overridable,
+ Callback2<SSLCertErrorHandler*, bool>::Type* callback) OVERRIDE;
+ virtual void ShowClientCertificateRequestDialog(
+ int render_process_id,
+ int render_view_id,
+ SSLClientAuthHandler* handler) OVERRIDE;
+ virtual void AddNewCertificate(
+ net::URLRequest* request,
+ net::X509Certificate* cert,
+ int render_process_id,
+ int render_view_id) OVERRIDE;
+ virtual void RequestDesktopNotificationPermission(
+ const GURL& source_origin,
+ int callback_context,
+ int render_process_id,
+ int render_view_id) OVERRIDE;
+ virtual WebKit::WebNotificationPresenter::Permission
+ CheckDesktopNotificationPermission(
+ const GURL& source_url,
+ const content::ResourceContext& context) OVERRIDE;
+ virtual void ShowDesktopNotification(
+ const DesktopNotificationHostMsg_Show_Params& params,
+ int render_process_id,
+ int render_view_id,
+ bool worker) OVERRIDE;
+ virtual void CancelDesktopNotification(
+ int render_process_id,
+ int render_view_id,
+ int notification_id) OVERRIDE;
+ virtual bool CanCreateWindow(
+ const GURL& source_url,
+ WindowContainerType container_type,
+ const content::ResourceContext& context) OVERRIDE;
+ virtual std::string GetWorkerProcessTitle(
+ const GURL& url, const content::ResourceContext& context) OVERRIDE;
+ virtual ResourceDispatcherHost* GetResourceDispatcherHost() OVERRIDE;
+ virtual ui::Clipboard* GetClipboard() OVERRIDE;
+
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
+ virtual int GetCrashSignalFD(const std::string& process_type) OVERRIDE;
+#endif
+
+#if defined(USE_NSS)
+ virtual
+ crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate(
+ const GURL& url) OVERRIDE;
+#endif
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_