| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_BUBBLE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_BUBBLE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_BUBBLE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_BUBBLE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 11 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 12 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |
| 12 | 13 |
| 13 // Bubble controller for field validation error bubbles. | 14 // Bubble controller for field validation error bubbles. |
| 14 @interface AutofillBubbleController : BaseBubbleController { | 15 @interface AutofillBubbleController : BaseBubbleController { |
| 15 @private | 16 @private |
| 16 base::scoped_nsobject<NSTextField> label_; | 17 base::scoped_nsobject<NSTextField> label_; |
| 17 NSSize inset_; // Amount the label is inset from the window. | 18 NSSize inset_; // Amount the label is inset from the window. |
| 18 } | 19 } |
| 19 | 20 |
| 20 // Creates an error bubble with the given |message|. You need to call | 21 // Creates an error bubble with the given |message|. You need to call |
| 21 // -showWindow: to make the bubble visible. It will autorelease itself when the | 22 // -showWindow: to make the bubble visible. It will autorelease itself when the |
| 22 // user dismisses the bubble. | 23 // user dismisses the bubble. |
| 23 - (id)initWithParentWindow:(NSWindow*)parentWindow | 24 - (id)initWithParentWindow:(NSWindow*)parentWindow |
| 24 message:(NSString*)message; | 25 message:(NSString*)message; |
| 25 | 26 |
| 26 // Designated initializer. Creates a bubble with given |message| and insets the | 27 // Designated initializer. Creates a bubble with given |message| and insets the |
| 27 // text content by |inset|. | 28 // text content by |inset|, with the arrow positioned at |arrowLocation|. |
| 28 - (id)initWithParentWindow:(NSWindow*)parentWindow | 29 - (id)initWithParentWindow:(NSWindow*)parentWindow |
| 29 message:(NSString*)message | 30 message:(NSString*)message |
| 30 inset:(NSSize)inset; | 31 inset:(NSSize)inset |
| 32 arrowLocation:(info_bubble::BubbleArrowLocation)arrowLocation; |
| 31 | 33 |
| 32 // Maximum width that the bubble will occupy, regardless of message size. | 34 // Maximum width that the bubble will occupy, regardless of message size. |
| 33 - (CGFloat)maxWidth; | 35 - (CGFloat)maxWidth; |
| 34 | 36 |
| 35 @end | 37 @end |
| 36 | 38 |
| 37 | 39 |
| 38 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_BUBBLE_CONTROLLER_H_ | 40 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_BUBBLE_CONTROLLER_H_ |
| OLD | NEW |