OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <Carbon/Carbon.h> | 7 #include <Carbon/Carbon.h> |
8 | 8 |
9 #include "base/basictypes.h" | |
10 #include "base/logging.h" | 9 #include "base/logging.h" |
11 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "base/macros.h" |
12 #include "chrome/browser/chrome_notification_types.h" | 12 #include "chrome/browser/chrome_notification_types.h" |
13 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
14 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
15 #include "content/public/browser/notification_service.h" | 15 #include "content/public/browser/notification_service.h" |
16 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h
" | 16 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h
" |
17 | 17 |
18 namespace { | 18 namespace { |
19 const CGFloat kOrderInSlideOffset = 10; | 19 const CGFloat kOrderInSlideOffset = 10; |
20 const NSTimeInterval kOrderInAnimationDuration = 0.075; | 20 const NSTimeInterval kOrderInAnimationDuration = 0.075; |
21 const NSTimeInterval kOrderOutAnimationDuration = 0.15; | 21 const NSTimeInterval kOrderOutAnimationDuration = 0.15; |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 249 |
250 // Override -[NSWindow addChildWindow] to prevent ShareKit bugs propagating | 250 // Override -[NSWindow addChildWindow] to prevent ShareKit bugs propagating |
251 // to the browser window. See http://crbug.com/475855. | 251 // to the browser window. See http://crbug.com/475855. |
252 - (void)addChildWindow:(NSWindow*)childWindow | 252 - (void)addChildWindow:(NSWindow*)childWindow |
253 ordered:(NSWindowOrderingMode)orderingMode { | 253 ordered:(NSWindowOrderingMode)orderingMode { |
254 [[self parentWindow] removeChildWindow:self]; | 254 [[self parentWindow] removeChildWindow:self]; |
255 [super addChildWindow:childWindow ordered:orderingMode]; | 255 [super addChildWindow:childWindow ordered:orderingMode]; |
256 } | 256 } |
257 | 257 |
258 @end | 258 @end |
OLD | NEW |