OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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_COCOA_DOWNLOAD_SHELF_MAC_H_ | 5 #ifndef CHROME_BROWSER_COCOA_DOWNLOAD_SHELF_MAC_H_ |
6 #define CHROME_BROWSER_COCOA_DOWNLOAD_SHELF_MAC_H_ | 6 #define CHROME_BROWSER_COCOA_DOWNLOAD_SHELF_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "chrome/browser/download/download_shelf.h" | 13 #include "chrome/browser/download/download_shelf.h" |
14 | 14 |
15 class BaseDownloadItemModel; | 15 class BaseDownloadItemModel; |
16 class CustomDrawButton; | 16 class CustomDrawButton; |
17 class DownloadItemMac; | 17 class DownloadItemMac; |
18 | 18 |
19 @class ShelfView; | 19 @class ShelfView; |
20 @class DownloadShelfController; | 20 @class DownloadShelfController; |
21 | 21 |
22 // A class to bridge the chromium download shelf to mac gui. This is just a | 22 // A class to bridge the chromium download shelf to mac gui. This is just a |
23 // wrapper class that forward everything to DownloadShelfController. | 23 // wrapper class that forward everything to DownloadShelfController. |
24 | 24 |
25 class DownloadShelfMac : public DownloadShelf { | 25 class DownloadShelfMac : public DownloadShelf { |
26 public: | 26 public: |
27 explicit DownloadShelfMac(Browser* browser, | 27 explicit DownloadShelfMac(Browser* browser, |
28 DownloadShelfController* controller); | 28 DownloadShelfController* controller); |
29 | 29 |
30 // DownloadShelf implementation. | 30 // DownloadShelf implementation. |
31 virtual void AddDownload(BaseDownloadItemModel* download_model); | 31 virtual void AddDownload(BaseDownloadItemModel* download_model); |
32 virtual bool IsShowing() const; | 32 virtual bool IsShowing() const; |
33 virtual bool IsClosing() const; | 33 virtual bool IsClosing() const; |
34 virtual void Show(); | 34 virtual void Show(); |
35 virtual void Close(); | 35 virtual void Close(); |
36 virtual Browser* browser() const { return browser_; } | 36 virtual Browser* browser() const { return browser_; } |
37 | 37 |
38 private: | 38 private: |
39 // The browser that owns this shelf. | 39 // The browser that owns this shelf. |
40 Browser* browser_; | 40 Browser* browser_; |
41 | 41 |
42 DownloadShelfController* shelf_controller_; // weak, owns us | 42 DownloadShelfController* shelf_controller_; // weak, owns us |
43 }; | 43 }; |
44 | 44 |
45 #endif // CHROME_BROWSER_COCOA_DOWNLOAD_SHELF_MAC_H_ | 45 #endif // CHROME_BROWSER_COCOA_DOWNLOAD_SHELF_MAC_H_ |
OLD | NEW |