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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 338012: About box auto-update improvements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « chrome/app/keystone_glue_unittest.mm ('k') | chrome/browser/cocoa/about_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
===================================================================
--- chrome/browser/app_controller_mac.mm (revision 30049)
+++ chrome/browser/app_controller_mac.mm (working copy)
@@ -665,26 +665,17 @@
// window controller.
- (void)aboutWindowClosed:(NSNotification*)notify {
[[NSNotificationCenter defaultCenter]
- removeObserver:self
- name:kUserClosedAboutNotification
- object:aboutController_.get()];
- aboutController_.reset(NULL);
+ removeObserver:self
+ name:kUserClosedAboutNotification
+ object:aboutController_.get()];
+ aboutController_.reset(nil);
}
- (IBAction)orderFrontStandardAboutPanel:(id)sender {
- // Otherwise bring up our special dialog (e.g. with an auto-update button).
if (!aboutController_) {
aboutController_.reset([[AboutWindowController alloc]
- initWithProfile:[self defaultProfile]]);
- if (!aboutController_) {
- // If we get here something is wacky. I managed to do it when
- // testing by explicitly forcing an auto-update to an older
- // version then trying to open the about box again (missing
- // nib). This shouldn't be possible in general but let's try
- // hard to not do nothing.
- [NSApp orderFrontStandardAboutPanel:sender];
- return;
- }
+ initWithProfile:[self defaultProfile]]);
+
// Watch for a notification of when it goes away so that we can destroy
// the controller.
[[NSNotificationCenter defaultCenter]
@@ -693,8 +684,10 @@
name:kUserClosedAboutNotification
object:aboutController_.get()];
}
+
if (![[aboutController_ window] isVisible])
[[aboutController_ window] center];
+
[aboutController_ showWindow:self];
}
« no previous file with comments | « chrome/app/keystone_glue_unittest.mm ('k') | chrome/browser/cocoa/about_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698