OLD | NEW |
1 // Copyright (c) 2010 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 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 5 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/scoped_nsobject.h" | 9 #include "base/scoped_nsobject.h" |
10 #include "chrome/common/notification_observer.h" | 10 #include "content/common/notification_observer.h" |
11 #include "chrome/common/notification_registrar.h" | 11 #include "content/common/notification_registrar.h" |
12 #include "chrome/common/notification_service.h" | 12 #include "content/common/notification_service.h" |
13 #include "chrome/common/notification_type.h" | 13 #include "content/common/notification_type.h" |
14 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 14 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 const CGFloat kOrderInSlideOffset = 10; | 17 const CGFloat kOrderInSlideOffset = 10; |
18 const NSTimeInterval kOrderInAnimationDuration = 0.2; | 18 const NSTimeInterval kOrderInAnimationDuration = 0.2; |
19 const NSTimeInterval kOrderOutAnimationDuration = 0.15; | 19 const NSTimeInterval kOrderOutAnimationDuration = 0.15; |
20 // The minimum representable time interval. This can be used as the value | 20 // The minimum representable time interval. This can be used as the value |
21 // passed to +[NSAnimationContext setDuration:] to stop an in-progress | 21 // passed to +[NSAnimationContext setDuration:] to stop an in-progress |
22 // animation as quickly as possible. | 22 // animation as quickly as possible. |
23 const NSTimeInterval kMinimumTimeInterval = | 23 const NSTimeInterval kMinimumTimeInterval = |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 - (void)sendEvent:(NSEvent*)theEvent { | 213 - (void)sendEvent:(NSEvent*)theEvent { |
214 if (!closing_) | 214 if (!closing_) |
215 [super sendEvent:theEvent]; | 215 [super sendEvent:theEvent]; |
216 } | 216 } |
217 | 217 |
218 - (BOOL)isClosing { | 218 - (BOOL)isClosing { |
219 return closing_; | 219 return closing_; |
220 } | 220 } |
221 | 221 |
222 @end | 222 @end |
OLD | NEW |