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_TEST_TEST_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_TEST_TEST_CONTENT_BROWSER_CLIENT_H_ |
6 #define CONTENT_TEST_TEST_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_TEST_TEST_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "content/public/browser/content_browser_client.h" | 13 #include "content/public/browser/content_browser_client.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 // Base for unit tests that need a ContentBrowserClient. | 17 // Base for unit tests that need a ContentBrowserClient. |
18 class TestContentBrowserClient : public ContentBrowserClient { | 18 class TestContentBrowserClient : public ContentBrowserClient { |
19 public: | 19 public: |
20 TestContentBrowserClient(); | 20 TestContentBrowserClient(); |
21 virtual ~TestContentBrowserClient(); | 21 virtual ~TestContentBrowserClient(); |
22 | 22 |
23 virtual WebContentsView* OverrideCreateWebContentsView( | 23 virtual WebContentsView* OverrideCreateWebContentsView( |
24 WebContents* web_contents, | 24 WebContents* web_contents, |
25 RenderViewHostDelegateView** render_view_host_delegate_view) OVERRIDE; | 25 RenderViewHostDelegateView** render_view_host_delegate_view) OVERRIDE; |
26 virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; | 26 virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; |
27 | 27 |
28 private: | 28 private: |
29 // Temporary directory for GetDefaultDownloadDirectory. | 29 // Temporary directory for GetDefaultDownloadDirectory. |
30 ScopedTempDir download_dir_; | 30 base::ScopedTempDir download_dir_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(TestContentBrowserClient); | 32 DISALLOW_COPY_AND_ASSIGN(TestContentBrowserClient); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace content | 35 } // namespace content |
36 | 36 |
37 #endif // CONTENT_TEST_TEST_CONTENT_BROWSER_CLIENT_H_ | 37 #endif // CONTENT_TEST_TEST_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |