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

Unified Diff: chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.mm

Issue 313203004: Make ExtensionInstallPrompt::Prompt ref-counted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master for CQ Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.mm b/chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.mm
index d1128ab63e571fb568518f3550d579cba1d4c850..c4578693582212152b07e79db73e58701013e22c 100644
--- a/chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.mm
@@ -21,14 +21,14 @@
- (id)initWithNavigator:(content::PageNavigator*)navigator
delegate:(WindowedInstallDialogController*)delegate
- prompt:(const ExtensionInstallPrompt::Prompt&)prompt;
+ prompt:(scoped_refptr<ExtensionInstallPrompt::Prompt>)prompt;
@end
WindowedInstallDialogController::WindowedInstallDialogController(
const ExtensionInstallPrompt::ShowParams& show_params,
ExtensionInstallPrompt::Delegate* delegate,
- const ExtensionInstallPrompt::Prompt& prompt)
+ scoped_refptr<ExtensionInstallPrompt::Prompt> prompt)
: delegate_(delegate) {
install_controller_.reset([[WindowedInstallController alloc]
initWithNavigator:show_params.navigator
@@ -72,7 +72,7 @@ void WindowedInstallDialogController::InstallUIAbort(bool user_initiated) {
- (id)initWithNavigator:(content::PageNavigator*)navigator
delegate:(WindowedInstallDialogController*)delegate
- prompt:(const ExtensionInstallPrompt::Prompt&)prompt {
+ prompt:(scoped_refptr<ExtensionInstallPrompt::Prompt>)prompt {
base::scoped_nsobject<NSWindow> controlledPanel(
[[NSPanel alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
styleMask:NSTitledWindowMask
@@ -94,7 +94,7 @@ void WindowedInstallDialogController::InstallUIAbort(bool user_initiated) {
if ([window respondsToSelector:@selector(setAnimationBehavior:)])
[window setAnimationBehavior:NSWindowAnimationBehaviorAlertPanel];
- [window setTitle:base::SysUTF16ToNSString(prompt.GetDialogTitle())];
+ [window setTitle:base::SysUTF16ToNSString(prompt->GetDialogTitle())];
NSRect viewFrame = [[installViewController_ view] frame];
[window setFrame:[window frameRectForContentRect:viewFrame]
display:NO];

Powered by Google App Engine
This is Rietveld 408576698