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

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

Issue 1162393003: Replace info_bubble::BubbleArrowLocation with views::BubbleBorder::Arrow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile in test Created 5 years, 6 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 "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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698