Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: chrome/browser/cocoa/extension_installed_bubble_controller.h

Issue 4724005: Add a help bubble pointing to the omnibox when installing an extension with (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: xib Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 15 matching lines...) Expand all
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 kBrowserAction, 35 kBrowserAction,
36 kPageAction, 36 kGeneric,
37 kGeneric 37 kOmniboxKeyword,
38 kPageAction
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
45 // future. 46 // future.
46 @interface ExtensionInstalledBubbleController : 47 @interface ExtensionInstalledBubbleController :
47 NSWindowController<NSWindowDelegate> { 48 NSWindowController<NSWindowDelegate> {
(...skipping 13 matching lines...) Expand all
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 13 matching lines...) Expand all
95 97
96 @end 98 @end
97 99
98 @interface ExtensionInstalledBubbleController(ExposedForTesting) 100 @interface ExtensionInstalledBubbleController(ExposedForTesting)
99 101
100 - (void)removePageActionPreviewIfNecessary; 102 - (void)removePageActionPreviewIfNecessary;
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)getExtraInfoMsgFrame;
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_
OLDNEW
« no previous file with comments | « chrome/app/nibs/ExtensionInstalledBubble.xib ('k') | chrome/browser/cocoa/extension_installed_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698