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

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

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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_
7
8 #include "base/basictypes.h"
9 #include "chrome/browser/download/download_request_manager.h"
10 #include "chrome/browser/tab_contents/infobar_delegate.h"
11
12 class TabContents;
13
14 // An infobar delegate that presents the user with a choice to allow or deny
15 // multiple downloads from the same site. This confirmation step protects
16 // against "carpet-bombing", where a malicious site forces multiple downloads
17 // on an unsuspecting user.
18 class DownloadRequestInfoBarDelegate : public ConfirmInfoBarDelegate {
19 public:
20 DownloadRequestInfoBarDelegate(
21 TabContents* tab, DownloadRequestManager::TabDownloadState* host);
22
23 virtual ~DownloadRequestInfoBarDelegate();
24
25 void set_host(DownloadRequestManager::TabDownloadState* host) {
26 host_ = host;
27 }
28
29 virtual void InfoBarClosed();
30
31 virtual std::wstring GetMessageText() const;
32
33 virtual SkBitmap* GetIcon() const;
34
35 virtual int GetButtons() const;
36
37 virtual std::wstring GetButtonLabel(
38 ConfirmInfoBarDelegate::InfoBarButton button) const;
39
40 virtual bool Accept();
41
42 virtual bool Cancel();
43
44 private:
45 DownloadRequestManager::TabDownloadState* host_;
46
47 DISALLOW_COPY_AND_ASSIGN(DownloadRequestInfoBarDelegate);
48 };
49
50 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698