| 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include <memory> |
| 8 |
| 8 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" | 9 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" |
| 9 | 10 |
| 10 class AppNotificationBridge; | 11 class AppNotificationBridge; |
| 11 | 12 |
| 12 namespace info_bubble { | 13 namespace info_bubble { |
| 13 | 14 |
| 14 enum AnimationMask { | 15 enum AnimationMask { |
| 15 kAnimateNone = 0, | 16 kAnimateNone = 0, |
| 16 kAnimateOrderIn = 1 << 1, | 17 kAnimateOrderIn = 1 << 1, |
| 17 kAnimateOrderOut = 1 << 2, | 18 kAnimateOrderOut = 1 << 2, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 34 // If NO the window will never become key. | 35 // If NO the window will never become key. |
| 35 // Default YES. | 36 // Default YES. |
| 36 BOOL infoBubbleCanBecomeKeyWindow_; | 37 BOOL infoBubbleCanBecomeKeyWindow_; |
| 37 | 38 |
| 38 // If NO the window will not share key state with its parent. Defaults to YES. | 39 // If NO the window will not share key state with its parent. Defaults to YES. |
| 39 // Can be set both by external callers, but is also changed internally, in | 40 // Can be set both by external callers, but is also changed internally, in |
| 40 // response to resignKeyWindow and becomeKeyWindow events. | 41 // response to resignKeyWindow and becomeKeyWindow events. |
| 41 BOOL allowShareParentKeyState_; | 42 BOOL allowShareParentKeyState_; |
| 42 | 43 |
| 43 // Bridge to proxy Chrome notifications to the window. | 44 // Bridge to proxy Chrome notifications to the window. |
| 44 scoped_ptr<AppNotificationBridge> notificationBridge_; | 45 std::unique_ptr<AppNotificationBridge> notificationBridge_; |
| 45 } | 46 } |
| 46 | 47 |
| 47 @property(nonatomic) info_bubble::AllowedAnimations allowedAnimations; | 48 @property(nonatomic) info_bubble::AllowedAnimations allowedAnimations; |
| 48 @property(nonatomic) BOOL infoBubbleCanBecomeKeyWindow; | 49 @property(nonatomic) BOOL infoBubbleCanBecomeKeyWindow; |
| 49 @property(nonatomic) BOOL allowShareParentKeyState; | 50 @property(nonatomic) BOOL allowShareParentKeyState; |
| 50 | 51 |
| 51 // Superclass override. | 52 // Superclass override. |
| 52 - (BOOL)canBecomeKeyWindow; | 53 - (BOOL)canBecomeKeyWindow; |
| 53 | 54 |
| 54 // Returns YES if the window is in the process of closing. | 55 // Returns YES if the window is in the process of closing. |
| 55 // Can't use "windowWillClose" notification because that will be sent | 56 // Can't use "windowWillClose" notification because that will be sent |
| 56 // after the closing animation has completed. | 57 // after the closing animation has completed. |
| 57 - (BOOL)isClosing; | 58 - (BOOL)isClosing; |
| 58 | 59 |
| 59 @end | 60 @end |
| OLD | NEW |