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

Unified Diff: chrome/browser/ui/cocoa/download/download_shelf_controller.h

Issue 13318002: [Mac] Fix handling of download shelf auto close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use OCMock Created 7 years, 9 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 | « no previous file | chrome/browser/ui/cocoa/download/download_shelf_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/download/download_shelf_controller.h
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller.h b/chrome/browser/ui/cocoa/download/download_shelf_controller.h
index 50439b08b6a99a6d6b01d05d690d49f998d531a0..c801ecc99152b08574ef1b0d1c4dd2f6bbfc33fd 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller.h
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller.h
@@ -6,6 +6,7 @@
#include "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
+#include "ui/base/cocoa/tracking_area.h"
#import "chrome/browser/ui/cocoa/view_resizer.h"
@class AnimatableView;
@@ -43,10 +44,20 @@ class PageNavigator;
@private
IBOutlet HoverButton* hoverCloseButton_;
+ // YES if the download shelf is intended to be displayed. The shelf animates
+ // out when it is closing. During this time, barIsVisible_ is NO although the
+ // shelf is still visible on screen.
BOOL barIsVisible_;
+ // YES if the containing browser window is fullscreen.
BOOL isFullscreen_;
+ // YES if the shelf should be closed when the mouse leaves the shelf.
+ BOOL shouldCloseOnMouseExit_;
+
+ // YES if the mouse is currently over the download shelf.
+ BOOL isMouseInsideView_;
+
scoped_ptr<DownloadShelf> bridge_;
// Height of the shelf when it's fully visible.
@@ -56,10 +67,8 @@ class PageNavigator;
// out.
CGFloat currentShelfHeight_;
- // Used to autoclose the shelf when the mouse is moved off it. Is non-nil
- // only when a subsequent mouseExited event can trigger autoclose or when a
- // subsequent mouseEntered event will cancel autoclose. Is nil otherwise.
- scoped_nsobject<NSTrackingArea> trackingArea_;
+ // Used to autoclose the shelf when the mouse is moved off it.
+ ui::ScopedCrTrackingArea trackingArea_;
// The download items we have added to our shelf.
scoped_nsobject<NSMutableArray> downloadItemControllers_;
@@ -102,6 +111,9 @@ class PageNavigator;
// item should not have been already added to this shelf.
- (void)addDownloadItem:(content::DownloadItem*)downloadItem;
+// Similar to addDownloadItem above, but adds a DownloadItemController.
+- (void)add:(DownloadItemController*)download;
+
// Remove a download, possibly via clearing browser data.
- (void)remove:(DownloadItemController*)download;
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/download/download_shelf_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698