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_TEST_TEST_CONTENT_BROWSER_CLIENT_H_ |
6 #define CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_TEST_TEST_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 a ContentBrowserClient. |
19 class MockContentBrowserClient : public ContentBrowserClient { | 19 class TestContentBrowserClient : public ContentBrowserClient { |
20 public: | 20 public: |
21 MockContentBrowserClient(); | 21 TestContentBrowserClient(); |
22 virtual ~MockContentBrowserClient(); | 22 virtual ~TestContentBrowserClient(); |
23 | 23 |
24 virtual WebContentsView* OverrideCreateWebContentsView( | 24 virtual WebContentsView* OverrideCreateWebContentsView( |
25 WebContents* web_contents, | 25 WebContents* web_contents, |
26 RenderViewHostDelegateView** render_view_host_delegate_view) OVERRIDE; | 26 RenderViewHostDelegateView** render_view_host_delegate_view) OVERRIDE; |
27 virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; | 27 virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; |
28 | 28 |
29 private: | 29 private: |
30 // Temporary directory for GetDefaultDownloadDirectory. | 30 // Temporary directory for GetDefaultDownloadDirectory. |
31 ScopedTempDir download_dir_; | 31 ScopedTempDir download_dir_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(MockContentBrowserClient); | 33 DISALLOW_COPY_AND_ASSIGN(TestContentBrowserClient); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace content | 36 } // namespace content |
37 | 37 |
38 #endif // CONTENT_BROWSER_MOCK_CONTENT_BROWSER_CLIENT_H_ | 38 #endif // CONTENT_TEST_TEST_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |