Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: chrome/browser/cocoa/download_shelf_mac.h

Issue 93129: Initial download shelf on OS X.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: fix download_uitest Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/download_shelf_controller.mm ('k') | chrome/browser/cocoa/download_shelf_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/download_shelf_mac.h
===================================================================
--- chrome/browser/cocoa/download_shelf_mac.h (revision 12817)
+++ chrome/browser/cocoa/download_shelf_mac.h (working copy)
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_GTK_DOWNLOAD_SHELF_GTK_H_
-#define CHROME_BROWSER_GTK_DOWNLOAD_SHELF_GTK_H_
+#ifndef CHROME_BROWSER_COCOA_DOWNLOAD_SHELF_MAC_H_
+#define CHROME_BROWSER_COCOA_DOWNLOAD_SHELF_MAC_H_
-#include <gtk/gtk.h>
+#import <Cocoa/Cocoa.h>
#include <vector>
@@ -14,46 +14,31 @@
class BaseDownloadItemModel;
class CustomDrawButton;
-class DownloadItemGtk;
+class DownloadItemMac;
-class DownloadShelfGtk : public DownloadShelf {
- public:
- explicit DownloadShelfGtk(TabContents* tab_contents);
+@class ShelfView;
+@class DownloadShelfController;
- ~DownloadShelfGtk();
+// A class to bridge the chromium download shelf to mac gui. This is just a
+// wrapper class that forward everything to DownloadShelfController.
+class DownloadShelfMac : public DownloadShelf {
+ public:
+ explicit DownloadShelfMac(Browser* browser,
+ DownloadShelfController* controller);
+
// DownloadShelf implementation.
virtual void AddDownload(BaseDownloadItemModel* download_model);
virtual bool IsShowing() const;
+ virtual bool IsClosing() const;
+ virtual void Show();
+ virtual void Close();
private:
- // Show the shelf.
- void Show();
-
- // Hide the shelf.
- void Hide();
-
- static void OnButtonClick(GtkWidget* button, DownloadShelfGtk* toolbar);
-
- // |hbox_| holds the download items and buttons of the shelf.
- GtkWidget* hbox_;
-
- // |shelf_| is the highest level widget of the shelf. See the constructor
- // for an explanation of the widget layout.
- GtkWidget* shelf_;
-
- // This hbox holds the link text and download icon. It also holds the
- // distinction of being the leftmost non-download item widget on the shelf.
- GtkWidget* link_hbox_;
-
- // The 'x' that the user can press to hide the download shelf.
- scoped_ptr<CustomDrawButton> close_button_;
-
- // Keeps track of our current hide/show state.
- bool is_showing_;
-
// The download items we have added to our shelf.
- std::vector<DownloadItemGtk*> download_items_;
+ std::vector<DownloadItemMac*> download_items_;
+
+ DownloadShelfController* shelf_controller_; // weak, owns us
};
-#endif // CHROME_BROWSER_GTK_DOWNLOAD_SHELF_GTK_H_
+#endif // CHROME_BROWSER_COCOA_DOWNLOAD_SHELF_MAC_H_
Property changes on: chrome/browser/cocoa/download_shelf_mac.h
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/chrome/browser/gtk/download_shelf_gtk.h:r69-2775
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/cocoa/download_shelf_controller.mm ('k') | chrome/browser/cocoa/download_shelf_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698