| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "extension_installed_bubble_controller.h" | 5 #import "extension_installed_bubble_controller.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "base/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" | 12 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
| 13 #include "chrome/browser/ui/cocoa/browser_window_controller.h" | 13 #include "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 14 #include "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" | 14 #include "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" |
| 15 #include "chrome/browser/ui/cocoa/hover_close_button.h" | 15 #include "chrome/browser/ui/cocoa/hover_close_button.h" |
| 16 #include "chrome/browser/ui/cocoa/info_bubble_view.h" | 16 #include "chrome/browser/ui/cocoa/info_bubble_view.h" |
| 17 #include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 17 #include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
| 18 #include "chrome/browser/ui/cocoa/toolbar_controller.h" | 18 #include "chrome/browser/ui/cocoa/toolbar_controller.h" |
| 19 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 @implementation ExtensionInstalledBubbleController | 73 @implementation ExtensionInstalledBubbleController |
| 74 | 74 |
| 75 @synthesize extension = extension_; | 75 @synthesize extension = extension_; |
| 76 @synthesize pageActionRemoved = pageActionRemoved_; // Exposed for unit test. | 76 @synthesize pageActionRemoved = pageActionRemoved_; // Exposed for unit test. |
| 77 | 77 |
| 78 - (id)initWithParentWindow:(NSWindow*)parentWindow | 78 - (id)initWithParentWindow:(NSWindow*)parentWindow |
| 79 extension:(const Extension*)extension | 79 extension:(const Extension*)extension |
| 80 browser:(Browser*)browser | 80 browser:(Browser*)browser |
| 81 icon:(SkBitmap)icon { | 81 icon:(SkBitmap)icon { |
| 82 NSString* nibPath = | 82 NSString* nibPath = |
| 83 [mac_util::MainAppBundle() pathForResource:@"ExtensionInstalledBubble" | 83 [base::mac::MainAppBundle() pathForResource:@"ExtensionInstalledBubble" |
| 84 ofType:@"nib"]; | 84 ofType:@"nib"]; |
| 85 if ((self = [super initWithWindowNibPath:nibPath owner:self])) { | 85 if ((self = [super initWithWindowNibPath:nibPath owner:self])) { |
| 86 DCHECK(parentWindow); | 86 DCHECK(parentWindow); |
| 87 parentWindow_ = parentWindow; | 87 parentWindow_ = parentWindow; |
| 88 DCHECK(extension); | 88 DCHECK(extension); |
| 89 extension_ = extension; | 89 extension_ = extension; |
| 90 DCHECK(browser); | 90 DCHECK(browser); |
| 91 browser_ = browser; | 91 browser_ = browser; |
| 92 icon_.reset([gfx::SkBitmapToNSImage(icon) retain]); | 92 icon_.reset([gfx::SkBitmapToNSImage(icon) retain]); |
| 93 pageActionRemoved_ = NO; | 93 pageActionRemoved_ = NO; |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 369 |
| 370 - (NSRect)getExtensionInstalledInfoMsgFrame { | 370 - (NSRect)getExtensionInstalledInfoMsgFrame { |
| 371 return [extensionInstalledInfoMsg_ frame]; | 371 return [extensionInstalledInfoMsg_ frame]; |
| 372 } | 372 } |
| 373 | 373 |
| 374 - (void)extensionUnloaded:(id)sender { | 374 - (void)extensionUnloaded:(id)sender { |
| 375 extension_ = NULL; | 375 extension_ = NULL; |
| 376 } | 376 } |
| 377 | 377 |
| 378 @end | 378 @end |
| OLD | NEW |