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 #ifndef CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_ |
6 #define CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/scoped_temp_dir.h" | 13 #include "base/scoped_temp_dir.h" |
14 #include "content/public/browser/content_browser_client.h" | 14 #include "content/public/browser/content_browser_client.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 // Base for unit tests that need to mock the ContentBrowserClient. | 18 // Base for unit tests that need to mock the ContentBrowserClient. |
19 class MockContentBrowserClient : public ContentBrowserClient { | 19 class MockContentBrowserClient : public ContentBrowserClient { |
20 public: | 20 public: |
21 MockContentBrowserClient(); | 21 MockContentBrowserClient(); |
22 virtual ~MockContentBrowserClient(); | 22 virtual ~MockContentBrowserClient(); |
23 | 23 |
24 virtual BrowserMainParts* CreateBrowserMainParts( | 24 virtual BrowserMainParts* CreateBrowserMainParts( |
25 const MainFunctionParams& parameters) OVERRIDE; | 25 const MainFunctionParams& parameters) OVERRIDE; |
26 virtual WebContentsView* CreateWebContentsView( | 26 virtual WebContentsView* OverrideCreateWebContentsView( |
| 27 WebContents* web_contents) OVERRIDE; |
| 28 virtual WebContentsViewDelegate* GetWebContentsViewDelegate( |
27 WebContents* web_contents) OVERRIDE; | 29 WebContents* web_contents) OVERRIDE; |
28 virtual void RenderViewHostCreated( | 30 virtual void RenderViewHostCreated( |
29 RenderViewHost* render_view_host) OVERRIDE; | 31 RenderViewHost* render_view_host) OVERRIDE; |
30 virtual void RenderProcessHostCreated( | 32 virtual void RenderProcessHostCreated( |
31 RenderProcessHost* host) OVERRIDE; | 33 RenderProcessHost* host) OVERRIDE; |
32 virtual WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; | 34 virtual WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; |
33 virtual GURL GetEffectiveURL(BrowserContext* browser_context, | 35 virtual GURL GetEffectiveURL(BrowserContext* browser_context, |
34 const GURL& url) OVERRIDE; | 36 const GURL& url) OVERRIDE; |
35 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context, | 37 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context, |
36 const GURL& effective_url) OVERRIDE; | 38 const GURL& effective_url) OVERRIDE; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 private: | 179 private: |
178 // Temporary directory for GetDefaultDownloadDirectory. | 180 // Temporary directory for GetDefaultDownloadDirectory. |
179 ScopedTempDir download_dir_; | 181 ScopedTempDir download_dir_; |
180 | 182 |
181 DISALLOW_COPY_AND_ASSIGN(MockContentBrowserClient); | 183 DISALLOW_COPY_AND_ASSIGN(MockContentBrowserClient); |
182 }; | 184 }; |
183 | 185 |
184 } // namespace content | 186 } // namespace content |
185 | 187 |
186 #endif // CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_ | 188 #endif // CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |