1// Copyright (c) 2012 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_UI_COCOA_DOWNLOAD_DOWNLOAD_SHELF_MAC_H_ 6#define CHROME_BROWSER_UI_COCOA_DOWNLOAD_DOWNLOAD_SHELF_MAC_H_ 7 8#import <Cocoa/Cocoa.h> 9 10#include "base/compiler_specific.h" 11#include "chrome/browser/download/download_shelf.h" 12 13class DownloadItemModel; 14 15@class DownloadShelfController; 16 17// A class to bridge the chromium download shelf to mac gui. This is just a 18// wrapper class that forward everything to DownloadShelfController. 19 20class DownloadShelfMac : public DownloadShelf { 21 public: 22 DownloadShelfMac(Browser* browser, DownloadShelfController* controller); 23 24 // DownloadShelf implementation. 25 virtual bool IsShowing() const OVERRIDE; 26 virtual bool IsClosing() const OVERRIDE; 27 virtual Browser* browser() const OVERRIDE; 28 29 protected: 30 virtual void DoAddDownload(content::DownloadItem* download) OVERRIDE; 31 virtual void DoShow() OVERRIDE; 32 virtual void DoClose(CloseReason reason) OVERRIDE; 33 34 private: 35 // The browser that owns this shelf. 36 Browser* browser_; 37 38 DownloadShelfController* shelf_controller_; // weak, owns us 39}; 40 41#endif // CHROME_BROWSER_UI_COCOA_DOWNLOAD_DOWNLOAD_SHELF_MAC_H_ 42