| OLD | NEW |
| 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 #import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controlle
r.h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controlle
r.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/mac/bundle_locations.h" | 8 #include "base/mac/bundle_locations.h" |
| 9 #include "base/mac/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 return extensions::sync_helper::IsSyncableExtension(extension_) && | 171 return extensions::sync_helper::IsSyncableExtension(extension_) && |
| 172 SyncPromoUI::ShouldShowSyncPromo(browser_->profile()); | 172 SyncPromoUI::ShouldShowSyncPromo(browser_->profile()); |
| 173 } | 173 } |
| 174 | 174 |
| 175 - (void)windowWillClose:(NSNotification*)notification { | 175 - (void)windowWillClose:(NSNotification*)notification { |
| 176 // Turn off page action icon preview when the window closes, unless we | 176 // Turn off page action icon preview when the window closes, unless we |
| 177 // already removed it when the window resigned key status. | 177 // already removed it when the window resigned key status. |
| 178 [self removePageActionPreviewIfNecessary]; | 178 [self removePageActionPreviewIfNecessary]; |
| 179 extension_ = NULL; | 179 extension_ = NULL; |
| 180 browser_ = NULL; | 180 browser_ = NULL; |
| 181 | 181 [closeButton_ setTrackingEnabled:NO]; |
| 182 [super windowWillClose:notification]; | 182 [super windowWillClose:notification]; |
| 183 } | 183 } |
| 184 | 184 |
| 185 // The controller is the delegate of the window, so it receives "did resign | 185 // The controller is the delegate of the window, so it receives "did resign |
| 186 // key" notifications. When key is resigned, close the window. | 186 // key" notifications. When key is resigned, close the window. |
| 187 - (void)windowDidResignKey:(NSNotification*)notification { | 187 - (void)windowDidResignKey:(NSNotification*)notification { |
| 188 // If the browser window is closing, we need to remove the page action | 188 // If the browser window is closing, we need to remove the page action |
| 189 // immediately, otherwise the closing animation may overlap with | 189 // immediately, otherwise the closing animation may overlap with |
| 190 // browser destruction. | 190 // browser destruction. |
| 191 [self removePageActionPreviewIfNecessary]; | 191 [self removePageActionPreviewIfNecessary]; |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 install_ui->OpenAppInstalledUI(extension_->id()); | 700 install_ui->OpenAppInstalledUI(extension_->id()); |
| 701 } | 701 } |
| 702 | 702 |
| 703 - (void)awakeFromNib { | 703 - (void)awakeFromNib { |
| 704 if (bundle_) | 704 if (bundle_) |
| 705 return; | 705 return; |
| 706 [self initializeLabel]; | 706 [self initializeLabel]; |
| 707 } | 707 } |
| 708 | 708 |
| 709 @end | 709 @end |
| OLD | NEW |