| 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #import "base/mac/cocoa_protocols.h" | 7 #import "base/mac/cocoa_protocols.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 | 9 |
| 10 namespace BaseBubbleControllerInternal { | 10 namespace BaseBubbleControllerInternal { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 @interface BaseBubbleController : NSWindowController<NSWindowDelegate> { | 27 @interface BaseBubbleController : NSWindowController<NSWindowDelegate> { |
| 28 @private | 28 @private |
| 29 NSWindow* parentWindow_; // weak | 29 NSWindow* parentWindow_; // weak |
| 30 NSPoint anchor_; | 30 NSPoint anchor_; |
| 31 IBOutlet InfoBubbleView* bubble_; // to set arrow position | 31 IBOutlet InfoBubbleView* bubble_; // to set arrow position |
| 32 // Bridge that listens for notifications. | 32 // Bridge that listens for notifications. |
| 33 scoped_ptr<BaseBubbleControllerInternal::Bridge> base_bridge_; | 33 scoped_ptr<BaseBubbleControllerInternal::Bridge> base_bridge_; |
| 34 } | 34 } |
| 35 | 35 |
| 36 @property(nonatomic, readonly) NSWindow* parentWindow; | 36 @property(nonatomic, readonly) NSWindow* parentWindow; |
| 37 // The point in base screen coordinates at which the bubble should open and the |
| 38 // arrow tip points. |
| 37 @property(nonatomic, assign) NSPoint anchorPoint; | 39 @property(nonatomic, assign) NSPoint anchorPoint; |
| 38 @property(nonatomic, readonly) InfoBubbleView* bubble; | 40 @property(nonatomic, readonly) InfoBubbleView* bubble; |
| 39 | 41 |
| 40 // Creates a bubble. |nibPath| is just the basename, e.g. @"FirstRunBubble". | 42 // Creates a bubble. |nibPath| is just the basename, e.g. @"FirstRunBubble". |
| 41 // |anchoredAt| is in screen space. You need to call -showWindow: to make the | 43 // |anchoredAt| is in screen space. You need to call -showWindow: to make the |
| 42 // bubble visible. It will autorelease itself when the user dismisses the | 44 // bubble visible. It will autorelease itself when the user dismisses the |
| 43 // bubble. | 45 // bubble. |
| 44 // This is the designated initializer. | 46 // This is the designated initializer. |
| 45 - (id)initWithWindowNibPath:(NSString*)nibPath | 47 - (id)initWithWindowNibPath:(NSString*)nibPath |
| 46 parentWindow:(NSWindow*)parentWindow | 48 parentWindow:(NSWindow*)parentWindow |
| (...skipping 15 matching lines...) Expand all Loading... |
| 62 // contentView with an instance of InfoBubbleView. | 64 // contentView with an instance of InfoBubbleView. |
| 63 - (id)initWithWindow:(NSWindow*)theWindow | 65 - (id)initWithWindow:(NSWindow*)theWindow |
| 64 parentWindow:(NSWindow*)parentWindow | 66 parentWindow:(NSWindow*)parentWindow |
| 65 anchoredAt:(NSPoint)anchoredAt; | 67 anchoredAt:(NSPoint)anchoredAt; |
| 66 | 68 |
| 67 // Creates an autoreleased separator view with a given frame. The height of the | 69 // Creates an autoreleased separator view with a given frame. The height of the |
| 68 // frame is ignored. | 70 // frame is ignored. |
| 69 - (NSBox*)separatorWithFrame:(NSRect)frame; | 71 - (NSBox*)separatorWithFrame:(NSRect)frame; |
| 70 | 72 |
| 71 @end | 73 @end |
| OLD | NEW |