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

Side by Side Diff: chrome/browser/download/download_request_infobar_delegate.h

Issue 8539006: Cleanup: Remove unneeded forward declarations from various chrome/browser subdirectories. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/browser/download/download_request_limiter.h" 10 #include "chrome/browser/download/download_request_limiter.h"
11 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" 11 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
12 12
13 class TabContents;
14
15 // An infobar delegate that presents the user with a choice to allow or deny 13 // An infobar delegate that presents the user with a choice to allow or deny
16 // multiple downloads from the same site. This confirmation step protects 14 // multiple downloads from the same site. This confirmation step protects
17 // against "carpet-bombing", where a malicious site forces multiple downloads 15 // against "carpet-bombing", where a malicious site forces multiple downloads
18 // on an unsuspecting user. 16 // on an unsuspecting user.
19 class DownloadRequestInfoBarDelegate : public ConfirmInfoBarDelegate { 17 class DownloadRequestInfoBarDelegate : public ConfirmInfoBarDelegate {
20 public: 18 public:
21 DownloadRequestInfoBarDelegate( 19 DownloadRequestInfoBarDelegate(
22 InfoBarTabHelper* infobar_helper, 20 InfoBarTabHelper* infobar_helper,
23 DownloadRequestLimiter::TabDownloadState* host); 21 DownloadRequestLimiter::TabDownloadState* host);
24 22
25 void set_host(DownloadRequestLimiter::TabDownloadState* host) { 23 void set_host(DownloadRequestLimiter::TabDownloadState* host) {
26 host_ = host; 24 host_ = host;
27 } 25 }
28 26
29 private: 27 private:
30 virtual ~DownloadRequestInfoBarDelegate(); 28 virtual ~DownloadRequestInfoBarDelegate();
31 29
32 // ConfirmInfoBarDelegate: 30 // ConfirmInfoBarDelegate:
33 virtual gfx::Image* GetIcon() const OVERRIDE; 31 virtual gfx::Image* GetIcon() const OVERRIDE;
34 virtual string16 GetMessageText() const OVERRIDE; 32 virtual string16 GetMessageText() const OVERRIDE;
35 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; 33 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
36 virtual bool Accept() OVERRIDE; 34 virtual bool Accept() OVERRIDE;
37 35
38 DownloadRequestLimiter::TabDownloadState* host_; 36 DownloadRequestLimiter::TabDownloadState* host_;
39 37
40 DISALLOW_COPY_AND_ASSIGN(DownloadRequestInfoBarDelegate); 38 DISALLOW_COPY_AND_ASSIGN(DownloadRequestInfoBarDelegate);
41 }; 39 };
42 40
43 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_ 41 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_extension_api.h ('k') | chrome/browser/download/download_throttling_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698