| 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/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 if (bundle_) { | 106 if (bundle_) { |
| 107 type_ = extension_installed_bubble::kBundle; | 107 type_ = extension_installed_bubble::kBundle; |
| 108 } else if (!extension->omnibox_keyword().empty()) { | 108 } else if (!extension->omnibox_keyword().empty()) { |
| 109 type_ = extension_installed_bubble::kOmniboxKeyword; | 109 type_ = extension_installed_bubble::kOmniboxKeyword; |
| 110 } else if (extension->browser_action()) { | 110 } else if (extension->browser_action()) { |
| 111 type_ = extension_installed_bubble::kBrowserAction; | 111 type_ = extension_installed_bubble::kBrowserAction; |
| 112 } else if (extension->page_action() && | 112 } else if (extension->page_action() && |
| 113 !extension->page_action()->default_icon_path().empty()) { | 113 !extension->page_action()->default_icon_path().empty()) { |
| 114 type_ = extension_installed_bubble::kPageAction; | 114 type_ = extension_installed_bubble::kPageAction; |
| 115 } else { | 115 } else { |
| 116 NOTREACHED(); // kGeneric installs handled in the extension_install_ui. | 116 NOTREACHED(); // kGeneric installs handled in extension_install_prompt. |
| 117 } | 117 } |
| 118 | 118 |
| 119 if (type_ == extension_installed_bubble::kBundle) { | 119 if (type_ == extension_installed_bubble::kBundle) { |
| 120 [self showWindow:self]; | 120 [self showWindow:self]; |
| 121 } else { | 121 } else { |
| 122 // Start showing window only after extension has fully loaded. | 122 // Start showing window only after extension has fully loaded. |
| 123 extensionObserver_.reset(new ExtensionLoadedNotificationObserver( | 123 extensionObserver_.reset(new ExtensionLoadedNotificationObserver( |
| 124 self, browser->profile())); | 124 self, browser->profile())); |
| 125 } | 125 } |
| 126 } | 126 } |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 450 |
| 451 - (NSRect)getExtensionInstalledInfoMsgFrame { | 451 - (NSRect)getExtensionInstalledInfoMsgFrame { |
| 452 return [extensionInstalledInfoMsg_ frame]; | 452 return [extensionInstalledInfoMsg_ frame]; |
| 453 } | 453 } |
| 454 | 454 |
| 455 - (void)extensionUnloaded:(id)sender { | 455 - (void)extensionUnloaded:(id)sender { |
| 456 extension_ = NULL; | 456 extension_ = NULL; |
| 457 } | 457 } |
| 458 | 458 |
| 459 @end | 459 @end |
| OLD | NEW |