add a use_alsa gyp setting
[chromium-blink-merge.git] / content / test / test_content_browser_client.cc
blob5754fd206079f8d522589fa5a050f8a7df779cbf
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
3 // found in the LICENSE file.
5 #include "content/test/test_content_browser_client.h"
7 #include <string>
9 #include "base/files/file_path.h"
10 #include "base/logging.h"
11 #include "content/test/test_web_contents_view.h"
12 #include "googleurl/src/gurl.h"
14 namespace content {
16 TestContentBrowserClient::TestContentBrowserClient() {
19 TestContentBrowserClient::~TestContentBrowserClient() {
22 WebContentsViewPort* TestContentBrowserClient::OverrideCreateWebContentsView(
23 WebContents* web_contents,
24 RenderViewHostDelegateView** render_view_host_delegate_view) {
25 #if defined(OS_IOS)
26 return NULL;
27 #else
28 TestWebContentsView* rv = new TestWebContentsView;
29 *render_view_host_delegate_view = rv;
30 return rv;
31 #endif
34 base::FilePath TestContentBrowserClient::GetDefaultDownloadDirectory() {
35 if (!download_dir_.IsValid()) {
36 bool result = download_dir_.CreateUniqueTempDir();
37 CHECK(result);
39 return download_dir_.path();
42 } // namespace content