| 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/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, | 67 extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, |
| 68 content::Source<Profile>(profile)); | 68 content::Source<Profile>(profile)); |
| 69 } | 69 } |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 // NotificationObserver implementation. Tells the controller to start showing | 72 // NotificationObserver implementation. Tells the controller to start showing |
| 73 // its window on the main thread when the extension has finished loading. | 73 // its window on the main thread when the extension has finished loading. |
| 74 virtual void Observe( | 74 virtual void Observe( |
| 75 int type, | 75 int type, |
| 76 const content::NotificationSource& source, | 76 const content::NotificationSource& source, |
| 77 const content::NotificationDetails& details) OVERRIDE { | 77 const content::NotificationDetails& details) override { |
| 78 if (type == extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED) { | 78 if (type == extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED) { |
| 79 const Extension* extension = | 79 const Extension* extension = |
| 80 content::Details<const Extension>(details).ptr(); | 80 content::Details<const Extension>(details).ptr(); |
| 81 if (extension == [controller_ extension]) { | 81 if (extension == [controller_ extension]) { |
| 82 [controller_ performSelectorOnMainThread:@selector(showWindow:) | 82 [controller_ performSelectorOnMainThread:@selector(showWindow:) |
| 83 withObject:controller_ | 83 withObject:controller_ |
| 84 waitUntilDone:NO]; | 84 waitUntilDone:NO]; |
| 85 } | 85 } |
| 86 } else if (type == extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED) { | 86 } else if (type == extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED) { |
| 87 const Extension* extension = | 87 const Extension* extension = |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 ExtensionInstallUI::OpenAppInstalledUI(browser_->profile(), extension_->id()); | 697 ExtensionInstallUI::OpenAppInstalledUI(browser_->profile(), extension_->id()); |
| 698 } | 698 } |
| 699 | 699 |
| 700 - (void)awakeFromNib { | 700 - (void)awakeFromNib { |
| 701 if (bundle_) | 701 if (bundle_) |
| 702 return; | 702 return; |
| 703 [self initializeLabel]; | 703 [self initializeLabel]; |
| 704 } | 704 } |
| 705 | 705 |
| 706 @end | 706 @end |
| OLD | NEW |