| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UI_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UI_CONTROLLER_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UI_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/download/all_download_item_notifier.h" | 12 #include "chrome/browser/download/all_download_item_notifier.h" |
| 12 | 13 |
| 13 // This class handles the task of observing a single DownloadManager for | 14 // This class handles the task of observing a single DownloadManager for |
| 14 // notifying the UI when a new download should be displayed in the UI. | 15 // notifying the UI when a new download should be displayed in the UI. |
| 15 // It invokes the OnNewDownloadReady() method of hte Delegate when the | 16 // It invokes the OnNewDownloadReady() method of hte Delegate when the |
| 16 // target path is available for a new download. | 17 // target path is available for a new download. |
| 17 class DownloadUIController : public AllDownloadItemNotifier::Observer { | 18 class DownloadUIController : public AllDownloadItemNotifier::Observer { |
| 18 public: | 19 public: |
| 19 // The delegate is responsible for figuring out how to notify the UI. | 20 // The delegate is responsible for figuring out how to notify the UI. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 45 content::DownloadItem* item) override; | 46 content::DownloadItem* item) override; |
| 46 | 47 |
| 47 AllDownloadItemNotifier download_notifier_; | 48 AllDownloadItemNotifier download_notifier_; |
| 48 | 49 |
| 49 scoped_ptr<Delegate> delegate_; | 50 scoped_ptr<Delegate> delegate_; |
| 50 | 51 |
| 51 DISALLOW_COPY_AND_ASSIGN(DownloadUIController); | 52 DISALLOW_COPY_AND_ASSIGN(DownloadUIController); |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UI_CONTROLLER_H_ | 55 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UI_CONTROLLER_H_ |
| OLD | NEW |