Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: content/shell/browser/layout_test/layout_test_download_manager_delegate.cc

Issue 1128633002: content: Rename WebKitTestController to BlinkTestController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clang-format Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/shell/browser/layout_test/layout_test_download_manager_delegat e.h" 5 #include "content/shell/browser/layout_test/layout_test_download_manager_delegat e.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <commdlg.h> 9 #include <commdlg.h>
10 #endif 10 #endif
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "content/public/browser/download_item.h" 16 #include "content/public/browser/download_item.h"
17 #include "content/public/browser/download_manager.h" 17 #include "content/public/browser/download_manager.h"
18 #include "content/shell/browser/webkit_test_controller.h" 18 #include "content/shell/browser/blink_test_controller.h"
19 #include "net/base/filename_util.h" 19 #include "net/base/filename_util.h"
20 20
21 #if defined(OS_WIN) 21 #if defined(OS_WIN)
22 #include "ui/aura/window.h" 22 #include "ui/aura/window.h"
23 #include "ui/aura/window_tree_host.h" 23 #include "ui/aura/window_tree_host.h"
24 #endif 24 #endif
25 25
26 namespace content { 26 namespace content {
27 27
28 LayoutTestDownloadManagerDelegate::LayoutTestDownloadManagerDelegate() 28 LayoutTestDownloadManagerDelegate::LayoutTestDownloadManagerDelegate()
29 : ShellDownloadManagerDelegate() {} 29 : ShellDownloadManagerDelegate() {}
30 30
31 LayoutTestDownloadManagerDelegate::~LayoutTestDownloadManagerDelegate(){ 31 LayoutTestDownloadManagerDelegate::~LayoutTestDownloadManagerDelegate(){
32 } 32 }
33 33
34 bool LayoutTestDownloadManagerDelegate::ShouldOpenDownload( 34 bool LayoutTestDownloadManagerDelegate::ShouldOpenDownload(
35 DownloadItem* item, 35 DownloadItem* item,
36 const DownloadOpenDelayedCallback& callback) { 36 const DownloadOpenDelayedCallback& callback) {
37 if (WebKitTestController::Get()->IsMainWindow(item->GetWebContents()) && 37 if (BlinkTestController::Get()->IsMainWindow(item->GetWebContents()) &&
38 item->GetMimeType() == "text/html") { 38 item->GetMimeType() == "text/html") {
39 WebKitTestController::Get()->OpenURL( 39 BlinkTestController::Get()->OpenURL(
40 net::FilePathToFileURL(item->GetFullPath())); 40 net::FilePathToFileURL(item->GetFullPath()));
41 } 41 }
42 return true; 42 return true;
43 } 43 }
44 44
45 } // namespace content 45 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698