blob: 7b9d3683aa87a683952c509f5fd7399786a2a7dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// Copyright (c) 2012 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.
#include "content/test/test_content_browser_client.h"
#include <string>
#include "base/files/file_path.h"
#include "base/logging.h"
#include "content/test/test_web_contents_view.h"
namespace content {
TestContentBrowserClient::TestContentBrowserClient() {
}
TestContentBrowserClient::~TestContentBrowserClient() {
}
WebContentsViewPort* TestContentBrowserClient::OverrideCreateWebContentsView(
WebContents* web_contents,
RenderViewHostDelegateView** render_view_host_delegate_view) {
#if defined(OS_IOS)
return NULL;
#else
TestWebContentsView* rv = new TestWebContentsView;
*render_view_host_delegate_view = rv;
return rv;
#endif
}
base::FilePath TestContentBrowserClient::GetDefaultDownloadDirectory() {
if (!download_dir_.IsValid()) {
bool result = download_dir_.CreateUniqueTempDir();
CHECK(result);
}
return download_dir_.path();
}
} // namespace content
|