diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 19:01:19 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 19:01:19 +0000 |
commit | f4f50efb4d3ee42470c8057345e902ac42e76801 (patch) | |
tree | 5b4d0c57cd94d8169db9dc441f424d6443e4f490 /chrome/browser/download/download_request_infobar_delegate.cc | |
parent | 0bd22cab9c919ff8d9b35153f6799dc031fe2770 (diff) | |
download | chromium_src-f4f50efb4d3ee42470c8057345e902ac42e76801.zip chromium_src-f4f50efb4d3ee42470c8057345e902ac42e76801.tar.gz chromium_src-f4f50efb4d3ee42470c8057345e902ac42e76801.tar.bz2 |
Cleanup: de-inline a bunch of classes, rename and move "PluginInstaller" to "PluginInstallerInfoBarDelegate" for clarity, lots of other misc. stuff
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6249010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_request_infobar_delegate.cc')
-rw-r--r-- | chrome/browser/download/download_request_infobar_delegate.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/chrome/browser/download/download_request_infobar_delegate.cc b/chrome/browser/download/download_request_infobar_delegate.cc index 417dfa4..5d4b618 100644 --- a/chrome/browser/download/download_request_infobar_delegate.cc +++ b/chrome/browser/download/download_request_infobar_delegate.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -10,7 +10,8 @@ #include "grit/theme_resources.h" #include "ui/base/resource/resource_bundle.h" -DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate(TabContents* tab, +DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate( + TabContents* tab, DownloadRequestLimiter::TabDownloadState* host) : ConfirmInfoBarDelegate(tab), host_(host) { @@ -27,25 +28,23 @@ void DownloadRequestInfoBarDelegate::InfoBarClosed() { ConfirmInfoBarDelegate::InfoBarClosed(); } -string16 DownloadRequestInfoBarDelegate::GetMessageText() const { - return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING); -} - SkBitmap* DownloadRequestInfoBarDelegate::GetIcon() const { return ResourceBundle::GetSharedInstance().GetBitmapNamed( IDR_INFOBAR_MULTIPLE_DOWNLOADS); } +string16 DownloadRequestInfoBarDelegate::GetMessageText() const { + return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING); +} + int DownloadRequestInfoBarDelegate::GetButtons() const { return BUTTON_OK | BUTTON_CANCEL; } string16 DownloadRequestInfoBarDelegate::GetButtonLabel( - ConfirmInfoBarDelegate::InfoBarButton button) const { - if (button == BUTTON_OK) - return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING_ALLOW); - else - return l10n_util::GetStringUTF16(IDS_MULTI_DOWNLOAD_WARNING_DENY); + InfoBarButton button) const { + return l10n_util::GetStringUTF16((button == BUTTON_OK) ? + IDS_MULTI_DOWNLOAD_WARNING_ALLOW : IDS_MULTI_DOWNLOAD_WARNING_DENY); } bool DownloadRequestInfoBarDelegate::Accept() { |