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

Unified Diff: chrome/browser/download/download_request_dialog_delegate_win.cc

Issue 275011: Make the multiple download request dialog an infobar.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/download/download_request_dialog_delegate_win.cc
===================================================================
--- chrome/browser/download/download_request_dialog_delegate_win.cc (revision 28899)
+++ chrome/browser/download/download_request_dialog_delegate_win.cc (working copy)
@@ -1,60 +0,0 @@
-// Copyright (c) 2006-2009 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 "chrome/browser/download/download_request_dialog_delegate_win.h"
-
-#include "app/l10n_util.h"
-#include "app/message_box_flags.h"
-#include "chrome/browser/tab_contents/constrained_window.h"
-#include "chrome/browser/tab_contents/tab_contents.h"
-#include "grit/generated_resources.h"
-#include "views/controls/message_box_view.h"
-
-// static
-DownloadRequestDialogDelegate* DownloadRequestDialogDelegate::Create(
- TabContents* tab,
- DownloadRequestManager::TabDownloadState* host) {
- return new DownloadRequestDialogDelegateWin(tab, host);
-}
-
-DownloadRequestDialogDelegateWin::DownloadRequestDialogDelegateWin(
- TabContents* tab,
- DownloadRequestManager::TabDownloadState* host)
- : DownloadRequestDialogDelegate(host) {
- message_view_ = new MessageBoxView(
- MessageBoxFlags::kIsConfirmMessageBox,
- l10n_util::GetString(IDS_MULTI_DOWNLOAD_WARNING),
- std::wstring());
- window_ = tab->CreateConstrainedDialog(this);
-}
-
-void DownloadRequestDialogDelegateWin::CloseWindow() {
- window_->CloseConstrainedWindow();
-}
-
-bool DownloadRequestDialogDelegateWin::Cancel() {
- return DoCancel();
-}
-
-bool DownloadRequestDialogDelegateWin::Accept() {
- return DoAccept();
-}
-
-views::View* DownloadRequestDialogDelegateWin::GetContentsView() {
- return message_view_;
-}
-
-std::wstring DownloadRequestDialogDelegateWin::GetDialogButtonLabel(
- MessageBoxFlags::DialogButton button) const {
- if (button == MessageBoxFlags::DIALOGBUTTON_OK)
- return l10n_util::GetString(IDS_MULTI_DOWNLOAD_WARNING_ALLOW);
- if (button == MessageBoxFlags::DIALOGBUTTON_CANCEL)
- return l10n_util::GetString(IDS_MULTI_DOWNLOAD_WARNING_DENY);
- return std::wstring();
-}
-
-void DownloadRequestDialogDelegateWin::DeleteDelegate() {
- DCHECK(!host_);
- delete this;
-}

Powered by Google App Engine
This is Rietveld 408576698