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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_uninstall_dialog_cocoa.mm

Issue 697023002: Cancel uninstall if the uninstall dialog's parent window is destroyed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 5 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 20 matching lines...) Expand all
31 ~ExtensionUninstallDialogCocoa() override; 31 ~ExtensionUninstallDialogCocoa() override;
32 32
33 private: 33 private:
34 void Show() override; 34 void Show() override;
35 }; 35 };
36 36
37 ExtensionUninstallDialogCocoa::ExtensionUninstallDialogCocoa( 37 ExtensionUninstallDialogCocoa::ExtensionUninstallDialogCocoa(
38 Profile* profile, 38 Profile* profile,
39 gfx::NativeWindow parent, 39 gfx::NativeWindow parent,
40 extensions::ExtensionUninstallDialog::Delegate* delegate) 40 extensions::ExtensionUninstallDialog::Delegate* delegate)
41 : extensions::ExtensionUninstallDialog(profile, parent, delegate) { 41 : extensions::ExtensionUninstallDialog(profile, parent, delegate) {
Nico 2014/11/03 17:51:26 Don't you need to remove it here? (and I guess the
42 } 42 }
43 43
44 ExtensionUninstallDialogCocoa::~ExtensionUninstallDialogCocoa() {} 44 ExtensionUninstallDialogCocoa::~ExtensionUninstallDialogCocoa() {}
45 45
46 void ExtensionUninstallDialogCocoa::Show() { 46 void ExtensionUninstallDialogCocoa::Show() {
47 NSAlert* alert = [[[NSAlert alloc] init] autorelease]; 47 NSAlert* alert = [[[NSAlert alloc] init] autorelease];
48 48
49 NSButton* continueButton = [alert addButtonWithTitle:l10n_util::GetNSString( 49 NSButton* continueButton = [alert addButtonWithTitle:l10n_util::GetNSString(
50 IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON)]; 50 IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON)];
51 NSButton* cancelButton = [alert addButtonWithTitle:l10n_util::GetNSString( 51 NSButton* cancelButton = [alert addButtonWithTitle:l10n_util::GetNSString(
(...skipping 14 matching lines...) Expand all
66 delegate_->ExtensionUninstallCanceled(); 66 delegate_->ExtensionUninstallCanceled();
67 } 67 }
68 68
69 } // namespace 69 } // namespace
70 70
71 // static 71 // static
72 extensions::ExtensionUninstallDialog* 72 extensions::ExtensionUninstallDialog*
73 extensions::ExtensionUninstallDialog::Create(Profile* profile, 73 extensions::ExtensionUninstallDialog::Create(Profile* profile,
74 gfx::NativeWindow parent, 74 gfx::NativeWindow parent,
75 Delegate* delegate) { 75 Delegate* delegate) {
76 return new ExtensionUninstallDialogCocoa(profile, parent, delegate); 76 return new ExtensionUninstallDialogCocoa(profile, delegate);
77 } 77 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698