| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_install_dialog_controller.
h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.
h" |
| 6 | 6 |
| 7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
| 8 #include "base/memory/scoped_nsobject.h" | 8 #include "base/memory/scoped_nsobject.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 maxStarRight = NSMaxX([[[ratingStars_ subviews] lastObject] frame]); | 281 maxStarRight = NSMaxX([[[ratingStars_ subviews] lastObject] frame]); |
| 282 } | 282 } |
| 283 NSRect starBounds = NSMakeRect(maxStarRight, 0, | 283 NSRect starBounds = NSMakeRect(maxStarRight, 0, |
| 284 skiaImage->width(), skiaImage->height()); | 284 skiaImage->width(), skiaImage->height()); |
| 285 [view setFrame:starBounds]; | 285 [view setFrame:starBounds]; |
| 286 [ratingStars_ addSubview:view]; | 286 [ratingStars_ addSubview:view]; |
| 287 } | 287 } |
| 288 | 288 |
| 289 @end // ExtensionInstallDialogController | 289 @end // ExtensionInstallDialogController |
| 290 | 290 |
| 291 void ShowExtensionInstallDialogImpl( | 291 void ShowExtensionInstallDialog( |
| 292 Profile* profile, | 292 Profile* profile, |
| 293 ExtensionInstallUI::Delegate* delegate, | 293 ExtensionInstallUI::Delegate* delegate, |
| 294 const Extension* extension, | 294 const Extension* extension, |
| 295 SkBitmap* icon, | 295 SkBitmap* icon, |
| 296 const ExtensionInstallUI::Prompt& prompt) { | 296 const ExtensionInstallUI::Prompt& prompt) { |
| 297 Browser* browser = BrowserList::GetLastActiveWithProfile(profile); | 297 Browser* browser = BrowserList::GetLastActiveWithProfile(profile); |
| 298 if (!browser) { | 298 if (!browser) { |
| 299 delegate->InstallUIAbort(false); | 299 delegate->InstallUIAbort(false); |
| 300 return; | 300 return; |
| 301 } | 301 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 313 initWithParentWindow:native_window | 313 initWithParentWindow:native_window |
| 314 profile:profile | 314 profile:profile |
| 315 extension:extension | 315 extension:extension |
| 316 delegate:delegate | 316 delegate:delegate |
| 317 icon:icon | 317 icon:icon |
| 318 prompt:prompt]; | 318 prompt:prompt]; |
| 319 | 319 |
| 320 // TODO(mihaip): Switch this to be tab-modal (http://crbug.com/95455) | 320 // TODO(mihaip): Switch this to be tab-modal (http://crbug.com/95455) |
| 321 [controller runAsModalSheet]; | 321 [controller runAsModalSheet]; |
| 322 } | 322 } |
| OLD | NEW |