OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ |
6 #define CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #import <Cocoa/Cocoa.h> | 10 #import <Cocoa/Cocoa.h> |
11 #import <QuartzCore/QuartzCore.h> | 11 #import <QuartzCore/QuartzCore.h> |
| 12 #include <stdint.h> |
12 | 13 |
13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/macros.h" |
14 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
15 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
16 #include "chrome/browser/ui/status_bubble.h" | 18 #include "chrome/browser/ui/status_bubble.h" |
17 #include "url/gurl.h" | 19 #include "url/gurl.h" |
18 | 20 |
19 class StatusBubbleMacTest; | 21 class StatusBubbleMacTest; |
20 @class StatusBubbleWindow; | 22 @class StatusBubbleWindow; |
21 | 23 |
22 class StatusBubbleMac : public StatusBubble { | 24 class StatusBubbleMac : public StatusBubble { |
23 public: | 25 public: |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 100 |
99 // Method called from the completion callbacks when a fade-in or fade-out | 101 // Method called from the completion callbacks when a fade-in or fade-out |
100 // transition has completed. | 102 // transition has completed. |
101 void AnimationDidStop(); | 103 void AnimationDidStop(); |
102 | 104 |
103 // One-shot timer operations to manage the delays associated with the | 105 // One-shot timer operations to manage the delays associated with the |
104 // kBubbleShowingTimer and kBubbleHidingTimer states. StartTimer and | 106 // kBubbleShowingTimer and kBubbleHidingTimer states. StartTimer and |
105 // TimerFired must be called from one of these states. StartTimer may be | 107 // TimerFired must be called from one of these states. StartTimer may be |
106 // called while the timer is still running; in that case, the timer will be | 108 // called while the timer is still running; in that case, the timer will be |
107 // reset. CancelTimer may be called from any state. | 109 // reset. CancelTimer may be called from any state. |
108 void StartTimer(int64 time_ms); | 110 void StartTimer(int64_t time_ms); |
109 void CancelTimer(); | 111 void CancelTimer(); |
110 void TimerFired(); | 112 void TimerFired(); |
111 | 113 |
112 // Begin the process of showing or hiding the status bubble. These may be | 114 // Begin the process of showing or hiding the status bubble. These may be |
113 // called from any state, and will take the appropriate action to initiate | 115 // called from any state, and will take the appropriate action to initiate |
114 // any state changes that may be needed. | 116 // any state changes that may be needed. |
115 void StartShowing(); | 117 void StartShowing(); |
116 void StartHiding(); | 118 void StartHiding(); |
117 | 119 |
118 // Cancel the expansion timer. | 120 // Cancel the expansion timer. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 @interface NSObject(StatusBubbleDelegate) | 193 @interface NSObject(StatusBubbleDelegate) |
192 // Called to query the delegate about the frame StatusBubble should position | 194 // Called to query the delegate about the frame StatusBubble should position |
193 // itself in. Frame is returned in the parent window coordinates. | 195 // itself in. Frame is returned in the parent window coordinates. |
194 - (NSRect)statusBubbleBaseFrame; | 196 - (NSRect)statusBubbleBaseFrame; |
195 | 197 |
196 // Called from SetState to notify the delegate of state changes. | 198 // Called from SetState to notify the delegate of state changes. |
197 - (void)statusBubbleWillEnterState:(StatusBubbleMac::StatusBubbleState)state; | 199 - (void)statusBubbleWillEnterState:(StatusBubbleMac::StatusBubbleState)state; |
198 @end | 200 @end |
199 | 201 |
200 #endif // CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ | 202 #endif // CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ |
OLD | NEW |