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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 months 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
OLDNEW
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 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_CONTROLLER _H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_CONTROLLER _H_
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_CONTROLLER _H_ 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_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
11 #import "base/mac/cocoa_protocols.h" 11 #import "base/mac/cocoa_protocols.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 13 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
14 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 14 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
15 #include "third_party/skia/include/core/SkBitmap.h" 15 #include "third_party/skia/include/core/SkBitmap.h"
16 16
17 class Browser; 17 class Browser;
18 class Extension;
19 class ExtensionLoadedNotificationObserver; 18 class ExtensionLoadedNotificationObserver;
20 @class HoverCloseButton; 19 @class HoverCloseButton;
21 @class InfoBubbleView; 20 @class InfoBubbleView;
22 21
23 namespace extensions { 22 namespace extensions {
24 class BundleInstaller; 23 class BundleInstaller;
24 class Extension;
25 } 25 }
26 26
27 namespace extension_installed_bubble { 27 namespace extension_installed_bubble {
28 28
29 // Maximum height or width of extension's icon (corresponds to Windows & GTK). 29 // Maximum height or width of extension's icon (corresponds to Windows & GTK).
30 const int kIconSize = 43; 30 const int kIconSize = 43;
31 31
32 // Outer vertical margin for text, icon, and closing x. 32 // Outer vertical margin for text, icon, and closing x.
33 const int kOuterVerticalMargin = 15; 33 const int kOuterVerticalMargin = 15;
34 34
(...skipping 10 matching lines...) Expand all
45 } ExtensionType; 45 } ExtensionType;
46 46
47 } // namespace extension_installed_bubble 47 } // namespace extension_installed_bubble
48 48
49 // Controller for the extension installed bubble. This bubble pops up after 49 // Controller for the extension installed bubble. This bubble pops up after
50 // an extension has been installed to inform the user that the install happened 50 // an extension has been installed to inform the user that the install happened
51 // properly, and to let the user know how to manage this extension in the 51 // properly, and to let the user know how to manage this extension in the
52 // future. 52 // future.
53 @interface ExtensionInstalledBubbleController : BaseBubbleController { 53 @interface ExtensionInstalledBubbleController : BaseBubbleController {
54 @private 54 @private
55 const Extension* extension_; // weak 55 const extensions::Extension* extension_; // weak
56 const extensions::BundleInstaller* bundle_; // weak 56 const extensions::BundleInstaller* bundle_; // weak
57 Browser* browser_; // weak 57 Browser* browser_; // weak
58 scoped_nsobject<NSImage> icon_; 58 scoped_nsobject<NSImage> icon_;
59 59
60 extension_installed_bubble::ExtensionType type_; 60 extension_installed_bubble::ExtensionType type_;
61 61
62 // We need to remove the page action immediately when the browser window 62 // We need to remove the page action immediately when the browser window
63 // closes while this bubble is still open, so the bubble's closing animation 63 // closes while this bubble is still open, so the bubble's closing animation
64 // doesn't overlap browser destruction. 64 // doesn't overlap browser destruction.
65 BOOL pageActionRemoved_; 65 BOOL pageActionRemoved_;
(...skipping 10 matching lines...) Expand all
76 // Only shown for page actions and omnibox keywords. 76 // Only shown for page actions and omnibox keywords.
77 IBOutlet NSTextField* extraInfoMsg_; 77 IBOutlet NSTextField* extraInfoMsg_;
78 IBOutlet NSTextField* extensionInstalledInfoMsg_; 78 IBOutlet NSTextField* extensionInstalledInfoMsg_;
79 // Only shown for bundle installs. 79 // Only shown for bundle installs.
80 IBOutlet NSTextField* installedHeadingMsg_; 80 IBOutlet NSTextField* installedHeadingMsg_;
81 IBOutlet NSTextField* installedItemsMsg_; 81 IBOutlet NSTextField* installedItemsMsg_;
82 IBOutlet NSTextField* failedHeadingMsg_; 82 IBOutlet NSTextField* failedHeadingMsg_;
83 IBOutlet NSTextField* failedItemsMsg_; 83 IBOutlet NSTextField* failedItemsMsg_;
84 } 84 }
85 85
86 @property(nonatomic, readonly) const Extension* extension; 86 @property(nonatomic, readonly) const extensions::Extension* extension;
87 @property(nonatomic, readonly) const extensions::BundleInstaller* bundle; 87 @property(nonatomic, readonly) const extensions::BundleInstaller* bundle;
88 @property(nonatomic) BOOL pageActionRemoved; 88 @property(nonatomic) BOOL pageActionRemoved;
89 89
90 // Initialize the window, and then create observers to wait for the extension 90 // Initialize the window, and then create observers to wait for the extension
91 // to complete loading, or the browser window to close. 91 // to complete loading, or the browser window to close.
92 - (id)initWithParentWindow:(NSWindow*)parentWindow 92 - (id)initWithParentWindow:(NSWindow*)parentWindow
93 extension:(const Extension*)extension 93 extension:(const extensions::Extension*)extension
94 bundle:(const extensions::BundleInstaller*)bundle 94 bundle:(const extensions::BundleInstaller*)bundle
95 browser:(Browser*)browser 95 browser:(Browser*)browser
96 icon:(SkBitmap)icon; 96 icon:(SkBitmap)icon;
97 97
98 // Action for close button. 98 // Action for close button.
99 - (IBAction)closeWindow:(id)sender; 99 - (IBAction)closeWindow:(id)sender;
100 100
101 // Displays the extension installed bubble. This callback is triggered by 101 // Displays the extension installed bubble. This callback is triggered by
102 // the extensionObserver when the extension has completed loading. 102 // the extensionObserver when the extension has completed loading.
103 - (void)showWindow:(id)sender; 103 - (void)showWindow:(id)sender;
(...skipping 10 matching lines...) Expand all
114 - (NSWindow*)initializeWindow; 114 - (NSWindow*)initializeWindow;
115 - (int)calculateWindowHeight; 115 - (int)calculateWindowHeight;
116 - (void)setMessageFrames:(int)newWindowHeight; 116 - (void)setMessageFrames:(int)newWindowHeight;
117 - (NSRect)getExtensionInstalledMsgFrame; 117 - (NSRect)getExtensionInstalledMsgFrame;
118 - (NSRect)getExtraInfoMsgFrame; 118 - (NSRect)getExtraInfoMsgFrame;
119 - (NSRect)getExtensionInstalledInfoMsgFrame; 119 - (NSRect)getExtensionInstalledInfoMsgFrame;
120 120
121 @end // ExtensionInstalledBubbleController(ExposedForTesting) 121 @end // ExtensionInstalledBubbleController(ExposedForTesting)
122 122
123 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_CONTROL LER_H_ 123 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_CONTROL LER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698