Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm

Issue 2717603003: [Mac] Make bubble arrow location/position RTL-aware (Closed)
Patch Set: Now with proper enum formatting Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698