| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "components/bubble/bubble_reference.h" | 9 #include "components/bubble/bubble_reference.h" |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 offset:(NSPoint)offset; | 81 offset:(NSPoint)offset; |
| 82 | 82 |
| 83 | 83 |
| 84 // For subclasses that do not load from a XIB, this will simply set the instance | 84 // For subclasses that do not load from a XIB, this will simply set the instance |
| 85 // variables appropriately. This will also replace the |-[self window]|'s | 85 // variables appropriately. This will also replace the |-[self window]|'s |
| 86 // contentView with an instance of InfoBubbleView. | 86 // contentView with an instance of InfoBubbleView. |
| 87 - (id)initWithWindow:(NSWindow*)theWindow | 87 - (id)initWithWindow:(NSWindow*)theWindow |
| 88 parentWindow:(NSWindow*)parentWindow | 88 parentWindow:(NSWindow*)parentWindow |
| 89 anchoredAt:(NSPoint)anchoredAt; | 89 anchoredAt:(NSPoint)anchoredAt; |
| 90 | 90 |
| 91 // Closes the bubble with BUBBLE_CLOSE_CANCELED. |
| 92 - (IBAction)cancel:(id)sender; |
| 93 |
| 91 // Creates an autoreleased horizontal separator view with a given frame. The | 94 // Creates an autoreleased horizontal separator view with a given frame. The |
| 92 // height of the frame is ignored. | 95 // height of the frame is ignored. |
| 93 - (NSBox*)horizontalSeparatorWithFrame:(NSRect)frame; | 96 - (NSBox*)horizontalSeparatorWithFrame:(NSRect)frame; |
| 94 | 97 |
| 95 // Creates an autoreleased vertical separator view with a given frame. The | 98 // Creates an autoreleased vertical separator view with a given frame. The |
| 96 // width of frame is ignored. | 99 // width of frame is ignored. |
| 97 - (NSBox*)verticalSeparatorWithFrame:(NSRect)frame; | 100 - (NSBox*)verticalSeparatorWithFrame:(NSRect)frame; |
| 98 | 101 |
| 99 | 102 |
| 100 @end | 103 @end |
| 101 | 104 |
| 102 // Methods for use by subclasses. | 105 // Methods for use by subclasses. |
| 103 @interface BaseBubbleController (Protected) | 106 @interface BaseBubbleController (Protected) |
| 104 // Registers event taps *after* the window is shown so that the bubble is | 107 // Registers event taps *after* the window is shown so that the bubble is |
| 105 // dismissed when it resigns key. This only needs to be called if | 108 // dismissed when it resigns key. This only needs to be called if |
| 106 // |-showWindow:| is overriden and does not call super. Noop on OSes <10.7. | 109 // |-showWindow:| is overriden and does not call super. Noop on OSes <10.7. |
| 107 - (void)registerKeyStateEventTap; | 110 - (void)registerKeyStateEventTap; |
| 108 @end | 111 @end |
| OLD | NEW |