OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SHELF_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "app/menus/simple_menu_model.h" | 9 #include "app/menus/simple_menu_model.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 | 14 |
15 class BaseDownloadItemModel; | 15 class BaseDownloadItemModel; |
16 class Browser; | 16 class Browser; |
17 class DownloadItem; | 17 class DownloadItem; |
18 | 18 |
19 // DownloadShelf is an interface for platform-specific download shelf views. | 19 // DownloadShelf is an interface for platform-specific download shelf views. |
20 class DownloadShelf { | 20 class DownloadShelf { |
21 public: | 21 public: |
22 virtual ~DownloadShelf() { } | 22 virtual ~DownloadShelf() {} |
23 | 23 |
24 // A new download has started, so add it to our shelf. This object will | 24 // A new download has started, so add it to our shelf. This object will |
25 // take ownership of |download_model|. Also make the shelf visible. | 25 // take ownership of |download_model|. Also make the shelf visible. |
26 virtual void AddDownload(BaseDownloadItemModel* download_model) = 0; | 26 virtual void AddDownload(BaseDownloadItemModel* download_model) = 0; |
27 | 27 |
28 // The browser view needs to know when we are going away to properly return | 28 // The browser view needs to know when we are going away to properly return |
29 // the resize corner size to WebKit so that we don't draw on top of it. | 29 // the resize corner size to WebKit so that we don't draw on top of it. |
30 // This returns the showing state of our animation which is set to true at | 30 // This returns the showing state of our animation which is set to true at |
31 // the beginning Show and false at the beginning of a Hide. | 31 // the beginning Show and false at the beginning of a Hide. |
32 virtual bool IsShowing() const = 0; | 32 virtual bool IsShowing() const = 0; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 private: | 83 private: |
84 // We show slightly different menus if the download is in progress vs. if the | 84 // We show slightly different menus if the download is in progress vs. if the |
85 // download has finished. | 85 // download has finished. |
86 scoped_ptr<menus::SimpleMenuModel> in_progress_download_menu_model_; | 86 scoped_ptr<menus::SimpleMenuModel> in_progress_download_menu_model_; |
87 scoped_ptr<menus::SimpleMenuModel> finished_download_menu_model_; | 87 scoped_ptr<menus::SimpleMenuModel> finished_download_menu_model_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); | 89 DISALLOW_COPY_AND_ASSIGN(DownloadShelfContextMenu); |
90 }; | 90 }; |
91 | 91 |
92 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ | 92 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_SHELF_H_ |
OLD | NEW |