| Index: chrome/browser/download/download_request_limiter.h
|
| diff --git a/chrome/browser/download/download_request_limiter.h b/chrome/browser/download/download_request_limiter.h
|
| index 457de30e5caa4ee737c9855c5803ac1396c9b362..c0e1fae74745b276bbc86c90a7e8c6281448b414 100644
|
| --- a/chrome/browser/download/download_request_limiter.h
|
| +++ b/chrome/browser/download/download_request_limiter.h
|
| @@ -17,6 +17,7 @@
|
| #include "content/public/browser/notification_registrar.h"
|
|
|
| class DownloadRequestInfoBarDelegate;
|
| +class DownloadRequestLimiterObserver;
|
| class TabContentsWrapper;
|
|
|
| namespace content {
|
| @@ -224,7 +225,7 @@ class DownloadRequestLimiter
|
|
|
| // Does the work of updating the download status on the UI thread and
|
| // potentially prompting the user.
|
| - void CanDownloadImpl(TabContentsWrapper* originating_tab,
|
| + void CanDownloadImpl(content::WebContents* originating_contents,
|
| int request_id,
|
| const std::string& request_method,
|
| const Callback& callback);
|
| @@ -238,6 +239,9 @@ class DownloadRequestLimiter
|
| // ALLOW_ONE_DOWNLOAD.
|
| void Remove(TabDownloadState* state);
|
|
|
| + void RemoveObserver(content::WebContents* web_contents,
|
| + DownloadRequestLimiterObserver* observer);
|
| +
|
| // Maps from tab to download state. The download state for a tab only exists
|
| // if the state is other than ALLOW_ONE_DOWNLOAD. Similarly once the state
|
| // transitions from anything but ALLOW_ONE_DOWNLOAD back to ALLOW_ONE_DOWNLOAD
|
| @@ -245,6 +249,10 @@ class DownloadRequestLimiter
|
| typedef std::map<content::NavigationController*, TabDownloadState*> StateMap;
|
| StateMap state_map_;
|
|
|
| + typedef std::map<content::WebContents*, DownloadRequestLimiterObserver*>
|
| + ObserverMap;
|
| + ObserverMap observer_map_;
|
| +
|
| static TestingDelegate* delegate_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter);
|
|
|