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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 } | 278 } |
279 | 279 |
280 // Finish nib loading, set arrow location and load icon into window. This | 280 // Finish nib loading, set arrow location and load icon into window. This |
281 // function is exposed for unit testing. | 281 // function is exposed for unit testing. |
282 - (NSWindow*)initializeWindow { | 282 - (NSWindow*)initializeWindow { |
283 NSWindow* window = [self window]; // completes nib load | 283 NSWindow* window = [self window]; // completes nib load |
284 | 284 |
285 if (installedBubble_ && | 285 if (installedBubble_ && |
286 installedBubble_->anchor_position() == | 286 installedBubble_->anchor_position() == |
287 ExtensionInstalledBubble::ANCHOR_OMNIBOX) { | 287 ExtensionInstalledBubble::ANCHOR_OMNIBOX) { |
288 [self.bubble setArrowLocation:info_bubble::kTopLeft]; | 288 [self.bubble setArrowLocation:info_bubble::kTopLeading]; |
289 } else { | 289 } else { |
290 [self.bubble setArrowLocation:info_bubble::kTopRight]; | 290 [self.bubble setArrowLocation:info_bubble::kTopTrailing]; |
291 } | 291 } |
292 | 292 |
293 // Set appropriate icon, resizing if necessary. | 293 // Set appropriate icon, resizing if necessary. |
294 if ([icon_ size].width > extension_installed_bubble::kIconSize) { | 294 if ([icon_ size].width > extension_installed_bubble::kIconSize) { |
295 [icon_ setSize:NSMakeSize(extension_installed_bubble::kIconSize, | 295 [icon_ setSize:NSMakeSize(extension_installed_bubble::kIconSize, |
296 extension_installed_bubble::kIconSize)]; | 296 extension_installed_bubble::kIconSize)]; |
297 } | 297 } |
298 [iconImage_ setImage:icon_]; | 298 [iconImage_ setImage:icon_]; |
299 [iconImage_ setNeedsDisplay:YES]; | 299 [iconImage_ setNeedsDisplay:YES]; |
300 return window; | 300 return window; |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 extensions::CreateExtensionInstallUI(browser_->profile())); | 467 extensions::CreateExtensionInstallUI(browser_->profile())); |
468 install_ui->OpenAppInstalledUI([self extension]->id()); | 468 install_ui->OpenAppInstalledUI([self extension]->id()); |
469 } | 469 } |
470 | 470 |
471 - (void)doClose { | 471 - (void)doClose { |
472 installedBubble_ = nullptr; | 472 installedBubble_ = nullptr; |
473 [self close]; | 473 [self close]; |
474 } | 474 } |
475 | 475 |
476 @end | 476 @end |
OLD | NEW |