| 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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 [self.parentWindow convertBaseToScreen:[self calculateArrowPoint]]; | 300 [self.parentWindow convertBaseToScreen:[self calculateArrowPoint]]; |
| 301 [super showWindow:sender]; | 301 [super showWindow:sender]; |
| 302 } | 302 } |
| 303 | 303 |
| 304 // Finish nib loading, set arrow location and load icon into window. This | 304 // Finish nib loading, set arrow location and load icon into window. This |
| 305 // function is exposed for unit testing. | 305 // function is exposed for unit testing. |
| 306 - (NSWindow*)initializeWindow { | 306 - (NSWindow*)initializeWindow { |
| 307 NSWindow* window = [self window]; // completes nib load | 307 NSWindow* window = [self window]; // completes nib load |
| 308 | 308 |
| 309 if (type_ == extension_installed_bubble::kOmniboxKeyword) { | 309 if (type_ == extension_installed_bubble::kOmniboxKeyword) { |
| 310 [self.bubble setArrowLocation:info_bubble::kTopLeft]; | 310 [self.bubble setArrowLocation:views::BubbleBorder::TOP_LEFT]; |
| 311 } else { | 311 } else { |
| 312 [self.bubble setArrowLocation:info_bubble::kTopRight]; | 312 [self.bubble setArrowLocation:views::BubbleBorder::TOP_RIGHT]; |
| 313 } | 313 } |
| 314 | 314 |
| 315 if (type_ == extension_installed_bubble::kBundle) | 315 if (type_ == extension_installed_bubble::kBundle) |
| 316 return window; | 316 return window; |
| 317 | 317 |
| 318 // Set appropriate icon, resizing if necessary. | 318 // Set appropriate icon, resizing if necessary. |
| 319 if ([icon_ size].width > extension_installed_bubble::kIconSize) { | 319 if ([icon_ size].width > extension_installed_bubble::kIconSize) { |
| 320 [icon_ setSize:NSMakeSize(extension_installed_bubble::kIconSize, | 320 [icon_ setSize:NSMakeSize(extension_installed_bubble::kIconSize, |
| 321 extension_installed_bubble::kIconSize)]; | 321 extension_installed_bubble::kIconSize)]; |
| 322 } | 322 } |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 install_ui->OpenAppInstalledUI([self extension]->id()); | 605 install_ui->OpenAppInstalledUI([self extension]->id()); |
| 606 } | 606 } |
| 607 | 607 |
| 608 - (void)awakeFromNib { | 608 - (void)awakeFromNib { |
| 609 if (bundle_) | 609 if (bundle_) |
| 610 return; | 610 return; |
| 611 [self initializeLabel]; | 611 [self initializeLabel]; |
| 612 } | 612 } |
| 613 | 613 |
| 614 @end | 614 @end |
| OLD | NEW |