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

Unified Diff: chrome/browser/ui/cocoa/status_bubble_mac.h

Issue 164333006: Fix the Mac status bubble. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nits Created 6 years, 10 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 | « base/mac/sdk_forward_declarations.h ('k') | chrome/browser/ui/cocoa/status_bubble_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/status_bubble_mac.h
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.h b/chrome/browser/ui/cocoa/status_bubble_mac.h
index 407c32999284a6e26796d06a7c8a29f38c1d2903..ad1e0e6ace8e8396c73e53fe37b1afaa11cc1be5 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac.h
+++ b/chrome/browser/ui/cocoa/status_bubble_mac.h
@@ -17,6 +17,7 @@
#include "url/gurl.h"
class StatusBubbleMacTest;
+@class StatusBubbleWindow;
class StatusBubbleMac : public StatusBubble {
public:
@@ -51,11 +52,6 @@ class StatusBubbleMac : public StatusBubble {
// call even when the status bubble does not exist.
void SwitchParentWindow(NSWindow* parent);
- // Delegate method called when a fade-in or fade-out transition has
- // completed. This is public so that it may be visible to the CAAnimation
- // delegate, which is an Objective-C object.
- void AnimationDidStop(CAAnimation* animation, bool finished);
-
// Expand the bubble to fit a URL too long for the standard bubble size.
void ExpandBubble();
@@ -97,6 +93,14 @@ class StatusBubbleMac : public StatusBubble {
// reverse a transition before it has completed.
void Fade(bool show);
+ // Starts an animation of the bubble window to a specific alpha value over a
+ // specific period of time.
+ void AnimateWindowAlpha(CGFloat alpha, NSTimeInterval duration);
+
+ // Method called from the completion callbacks when a fade-in or fade-out
+ // transition has completed.
+ void AnimationDidStop();
+
// One-shot timer operations to manage the delays associated with the
// kBubbleShowingTimer and kBubbleHidingTimer states. StartTimer and
// TimerFired must be called from one of these states. StartTimer may be
@@ -126,6 +130,10 @@ class StatusBubbleMac : public StatusBubble {
// The factory used to generate weak pointers for the expansion delay timer.
base::WeakPtrFactory<StatusBubbleMac> expand_timer_factory_;
+ // The factory used to generate weak pointers for the CAAnimation completion
+ // handlers.
+ base::WeakPtrFactory<StatusBubbleMac> completion_handler_factory_;
+
// Calculate the appropriate frame for the status bubble window. If
// |expanded_width|, use entire width of parent frame.
NSRect CalculateWindowFrame(bool expanded_width);
@@ -148,7 +156,7 @@ class StatusBubbleMac : public StatusBubble {
id delegate_; // WEAK
// The window we own.
- NSWindow* window_;
+ StatusBubbleWindow* window_;
// The status text we want to display when there are no URLs to display.
NSString* status_text_;
« no previous file with comments | « base/mac/sdk_forward_declarations.h ('k') | chrome/browser/ui/cocoa/status_bubble_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698