summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-11 02:07:13 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-11 02:07:13 +0000
commitf9f616c73294592ea50ec5764c820abb90a4122f (patch)
tree1c6c3a1640cda881fa90b1f44b08e874df342cc8
parent44f1c1941ebe9eed8e2904e439eb41418623cf0b (diff)
downloadchromium_src-f9f616c73294592ea50ec5764c820abb90a4122f.zip
chromium_src-f9f616c73294592ea50ec5764c820abb90a4122f.tar.gz
chromium_src-f9f616c73294592ea50ec5764c820abb90a4122f.tar.bz2
Remove TabContents from downloads.
BUG=107201 TEST=no visible change Review URL: https://chromiumcodereview.appspot.com/11464037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172233 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/download/download_danger_prompt.cc13
-rw-r--r--chrome/browser/download/download_danger_prompt.h4
-rw-r--r--chrome/browser/download/download_danger_prompt_browsertest.cc3
-rw-r--r--chrome/browser/download/download_request_limiter.h1
-rw-r--r--chrome/browser/download/download_util.cc2
-rw-r--r--chrome/browser/ui/webui/downloads_dom_handler.cc3
6 files changed, 11 insertions, 15 deletions
diff --git a/chrome/browser/download/download_danger_prompt.cc b/chrome/browser/download/download_danger_prompt.cc
index 22603c0..e3c463a 100644
--- a/chrome/browser/download/download_danger_prompt.cc
+++ b/chrome/browser/download/download_danger_prompt.cc
@@ -6,7 +6,6 @@
#include "base/bind.h"
#include "chrome/browser/download/chrome_download_manager_delegate.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tab_modal_confirm_dialog.h"
#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
#include "content/public/browser/browser_thread.h"
@@ -24,7 +23,7 @@ class DownloadDangerPromptImpl
public TabModalConfirmDialogDelegate {
public:
DownloadDangerPromptImpl(content::DownloadItem* item,
- TabContents* tab_contents,
+ content::WebContents* web_contents,
const base::Closure& accepted,
const base::Closure& canceled);
virtual ~DownloadDangerPromptImpl();
@@ -63,10 +62,10 @@ class DownloadDangerPromptImpl
DownloadDangerPromptImpl::DownloadDangerPromptImpl(
content::DownloadItem* download,
- TabContents* tab_contents,
+ content::WebContents* web_contents,
const base::Closure& accepted,
const base::Closure& canceled)
- : TabModalConfirmDialogDelegate(tab_contents->web_contents()),
+ : TabModalConfirmDialogDelegate(web_contents),
download_(download),
accepted_(accepted),
canceled_(canceled) {
@@ -145,12 +144,12 @@ void DownloadDangerPromptImpl::PrepareToClose() {
// static
DownloadDangerPrompt* DownloadDangerPrompt::Create(
content::DownloadItem* item,
- TabContents* tab_contents,
+ content::WebContents* web_contents,
const base::Closure& accepted,
const base::Closure& canceled) {
DownloadDangerPromptImpl* prompt =
- new DownloadDangerPromptImpl(item, tab_contents, accepted, canceled);
+ new DownloadDangerPromptImpl(item, web_contents, accepted, canceled);
// |prompt| will be deleted when the dialog is done.
- TabModalConfirmDialog::Create(prompt, tab_contents->web_contents());
+ TabModalConfirmDialog::Create(prompt, web_contents);
return prompt;
}
diff --git a/chrome/browser/download/download_danger_prompt.h b/chrome/browser/download/download_danger_prompt.h
index f42ef90..d16820b 100644
--- a/chrome/browser/download/download_danger_prompt.h
+++ b/chrome/browser/download/download_danger_prompt.h
@@ -8,10 +8,10 @@
#include "base/callback_forward.h"
class ConstrainedWindow;
-class TabContents;
namespace content {
class DownloadItem;
+class WebContents;
}
// Prompts the user for whether to Keep a dangerous DownloadItem using native
@@ -37,7 +37,7 @@ class DownloadDangerPrompt {
// caller does not own the object and receive no guarantees about lifetime.
static DownloadDangerPrompt* Create(
content::DownloadItem* item,
- TabContents* tab_contents,
+ content::WebContents* web_contents,
const base::Closure& accepted,
const base::Closure& canceled);
diff --git a/chrome/browser/download/download_danger_prompt_browsertest.cc b/chrome/browser/download/download_danger_prompt_browsertest.cc
index 2773ca3..f713570 100644
--- a/chrome/browser/download/download_danger_prompt_browsertest.cc
+++ b/chrome/browser/download/download_danger_prompt_browsertest.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_tabstrip.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -85,7 +84,7 @@ class DownloadDangerPromptTest : public InProcessBrowserTest {
void CreatePrompt() {
prompt_ = DownloadDangerPrompt::Create(
&download_,
- browser()->tab_strip_model()->GetActiveTabContents(),
+ browser()->tab_strip_model()->GetActiveWebContents(),
base::Bind(&DownloadDangerPromptTest::PromptCallback, this,
DownloadDangerPrompt::ACCEPT),
base::Bind(&DownloadDangerPromptTest::PromptCallback, this,
diff --git a/chrome/browser/download/download_request_limiter.h b/chrome/browser/download/download_request_limiter.h
index 2f465995..794cc38 100644
--- a/chrome/browser/download/download_request_limiter.h
+++ b/chrome/browser/download/download_request_limiter.h
@@ -17,7 +17,6 @@
#include "content/public/browser/web_contents_observer.h"
class DownloadRequestInfoBarDelegate;
-class TabContents;
namespace content {
class NavigationController;
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index 5833142..15c3d0a 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -388,7 +388,7 @@ void DragDownload(const DownloadItem* download,
ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE);
#else // We are on WIN without AURA
// We cannot use Widget::RunShellDrag on WIN since the |view| is backed by a
- // TabContentsViewWin, not a NativeWidgetWin.
+ // WebContentsViewWin, not a NativeWidgetWin.
scoped_refptr<ui::DragSource> drag_source(new ui::DragSource);
// Run the drag and drop loop
DWORD effects;
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 91ff933..6ff24f7 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -31,7 +31,6 @@
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/fileicon_source.h"
#include "chrome/common/time_format.h"
@@ -468,7 +467,7 @@ void DownloadsDOMHandler::ShowDangerPrompt(
content::DownloadItem* dangerous_item) {
DownloadDangerPrompt* danger_prompt = DownloadDangerPrompt::Create(
dangerous_item,
- TabContents::FromWebContents(GetWebUIWebContents()),
+ GetWebUIWebContents(),
base::Bind(&DownloadsDOMHandler::DangerPromptAccepted,
weak_ptr_factory_.GetWeakPtr(), dangerous_item->GetId()),
base::Closure());