X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fui%2Fcocoa%2Fstatus_bubble_mac.h;h=ad1e0e6ace8e8396c73e53fe37b1afaa11cc1be5;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=be7637fdb15e15bf68f5e4352a28db31fa8ce95e;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/ui/cocoa/status_bubble_mac.h b/src/chrome/browser/ui/cocoa/status_bubble_mac.h index be7637f..ad1e0e6 100644 --- a/src/chrome/browser/ui/cocoa/status_bubble_mac.h +++ b/src/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 @@ -119,12 +123,17 @@ class StatusBubbleMac : public StatusBubble { // for the given mouse position if necessary. Protected for use in tests. void SetFrameAvoidingMouse(NSRect window_frame, const gfx::Point& mouse_pos); - // The timer factory used for show and hide delay timers. + // The factory used to generate weak pointers for the show and hide delay + // timers. base::WeakPtrFactory timer_factory_; - // The timer factory used for the expansion delay timer. + // The factory used to generate weak pointers for the expansion delay timer. base::WeakPtrFactory expand_timer_factory_; + // The factory used to generate weak pointers for the CAAnimation completion + // handlers. + base::WeakPtrFactory 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); @@ -147,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_;