OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COCOA_EXTENSION_INSTALLED_BUBBLE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_EXTENSION_INSTALLED_BUBBLE_CONTROLLER_H_ |
6 #define CHROME_BROWSER_COCOA_EXTENSION_INSTALLED_BUBBLE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_EXTENSION_INSTALLED_BUBBLE_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... | |
25 const int kIconSize = 43; | 25 const int kIconSize = 43; |
26 | 26 |
27 // Outer vertical margin for text, icon, and closing x. | 27 // Outer vertical margin for text, icon, and closing x. |
28 const int kOuterVerticalMargin = 15; | 28 const int kOuterVerticalMargin = 15; |
29 | 29 |
30 // Inner vertical margin for text messages. | 30 // Inner vertical margin for text messages. |
31 const int kInnerVerticalMargin = 10; | 31 const int kInnerVerticalMargin = 10; |
32 | 32 |
33 // We use a different kind of notification for each of these extension types. | 33 // We use a different kind of notification for each of these extension types. |
34 typedef enum { | 34 typedef enum { |
35 kOmniboxKeyword, | |
Bons
2010/11/11 19:28:57
while you're in here, mind alphabetizing these?
Matt Perry
2010/11/12 07:20:25
Done.
| |
35 kBrowserAction, | 36 kBrowserAction, |
36 kPageAction, | 37 kPageAction, |
37 kGeneric | 38 kGeneric |
38 } ExtensionType; | 39 } ExtensionType; |
39 | 40 |
40 } | 41 } |
41 | 42 |
42 // Controller for the extension installed bubble. This bubble pops up after | 43 // Controller for the extension installed bubble. This bubble pops up after |
43 // an extension has been installed to inform the user that the install happened | 44 // an extension has been installed to inform the user that the install happened |
44 // properly, and to let the user know how to manage this extension in the | 45 // properly, and to let the user know how to manage this extension in the |
(...skipping 16 matching lines...) Expand all Loading... | |
61 // Lets us register for EXTENSION_LOADED notifications. The actual | 62 // Lets us register for EXTENSION_LOADED notifications. The actual |
62 // notifications are sent to the observer object, which proxies them | 63 // notifications are sent to the observer object, which proxies them |
63 // back to the controller. | 64 // back to the controller. |
64 scoped_ptr<ExtensionLoadedNotificationObserver> extensionObserver_; | 65 scoped_ptr<ExtensionLoadedNotificationObserver> extensionObserver_; |
65 | 66 |
66 // References below are weak, being obtained from the nib. | 67 // References below are weak, being obtained from the nib. |
67 IBOutlet InfoBubbleView* infoBubbleView_; | 68 IBOutlet InfoBubbleView* infoBubbleView_; |
68 IBOutlet HoverCloseButton* closeButton_; | 69 IBOutlet HoverCloseButton* closeButton_; |
69 IBOutlet NSImageView* iconImage_; | 70 IBOutlet NSImageView* iconImage_; |
70 IBOutlet NSTextField* extensionInstalledMsg_; | 71 IBOutlet NSTextField* extensionInstalledMsg_; |
71 IBOutlet NSTextField* pageActionInfoMsg_; // Only shown for page actions. | 72 // Only shown for page actions and omnibox keywords. |
73 IBOutlet NSTextField* extraInfoMsg_; | |
72 IBOutlet NSTextField* extensionInstalledInfoMsg_; | 74 IBOutlet NSTextField* extensionInstalledInfoMsg_; |
73 } | 75 } |
74 | 76 |
75 @property (nonatomic, readonly) const Extension* extension; | 77 @property (nonatomic, readonly) const Extension* extension; |
76 @property (nonatomic) BOOL pageActionRemoved; | 78 @property (nonatomic) BOOL pageActionRemoved; |
77 | 79 |
78 // Initialize the window, and then create observers to wait for the extension | 80 // Initialize the window, and then create observers to wait for the extension |
79 // to complete loading, or the browser window to close. | 81 // to complete loading, or the browser window to close. |
80 - (id)initWithParentWindow:(NSWindow*)parentWindow | 82 - (id)initWithParentWindow:(NSWindow*)parentWindow |
81 extension:(const Extension*)extension | 83 extension:(const Extension*)extension |
(...skipping 19 matching lines...) Expand all Loading... | |
101 - (NSWindow*)initializeWindow; | 103 - (NSWindow*)initializeWindow; |
102 - (int)calculateWindowHeight; | 104 - (int)calculateWindowHeight; |
103 - (void)setMessageFrames:(int)newWindowHeight; | 105 - (void)setMessageFrames:(int)newWindowHeight; |
104 - (NSRect)getExtensionInstalledMsgFrame; | 106 - (NSRect)getExtensionInstalledMsgFrame; |
105 - (NSRect)getPageActionInfoMsgFrame; | 107 - (NSRect)getPageActionInfoMsgFrame; |
106 - (NSRect)getExtensionInstalledInfoMsgFrame; | 108 - (NSRect)getExtensionInstalledInfoMsgFrame; |
107 | 109 |
108 @end // ExtensionInstalledBubbleController(ExposedForTesting) | 110 @end // ExtensionInstalledBubbleController(ExposedForTesting) |
109 | 111 |
110 #endif // CHROME_BROWSER_COCOA_EXTENSION_INSTALLED_BUBBLE_CONTROLLER_H_ | 112 #endif // CHROME_BROWSER_COCOA_EXTENSION_INSTALLED_BUBBLE_CONTROLLER_H_ |
OLD | NEW |