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

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

Issue 1508893003: Use proper namespace in skia/ext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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_install_view_controller.h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_install_view_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 [cancelButton_ setTitle:base::SysUTF16ToNSString( 300 [cancelButton_ setTitle:base::SysUTF16ToNSString(
301 prompt_->GetAbortButtonLabel())]; 301 prompt_->GetAbortButtonLabel())];
302 if ([self hasWebstoreData]) { 302 if ([self hasWebstoreData]) {
303 prompt_->AppendRatingStars(AppendRatingStarsShim, self); 303 prompt_->AppendRatingStars(AppendRatingStarsShim, self);
304 [ratingCountField_ setStringValue:base::SysUTF16ToNSString( 304 [ratingCountField_ setStringValue:base::SysUTF16ToNSString(
305 prompt_->GetRatingCount())]; 305 prompt_->GetRatingCount())];
306 [userCountField_ setStringValue:base::SysUTF16ToNSString( 306 [userCountField_ setStringValue:base::SysUTF16ToNSString(
307 prompt_->GetUserCount())]; 307 prompt_->GetUserCount())];
308 [[storeLinkButton_ cell] setUnderlineOnHover:YES]; 308 [[storeLinkButton_ cell] setUnderlineOnHover:YES];
309 [[storeLinkButton_ cell] setTextColor: 309 [[storeLinkButton_ cell] setTextColor:
310 gfx::SkColorToCalibratedNSColor(chrome_style::GetLinkColor())]; 310 skia::SkColorToCalibratedNSColor(chrome_style::GetLinkColor())];
311 } 311 }
312 312
313 [iconView_ setImage:prompt_->icon().ToNSImage()]; 313 [iconView_ setImage:prompt_->icon().ToNSImage()];
314 314
315 // The dialog is laid out in the NIB exactly how we want it assuming that 315 // The dialog is laid out in the NIB exactly how we want it assuming that
316 // each label fits on one line. However, for each label, we want to allow 316 // each label fits on one line. However, for each label, we want to allow
317 // wrapping onto multiple lines. So we accumulate an offset by measuring how 317 // wrapping onto multiple lines. So we accumulate an offset by measuring how
318 // big each label wants to be, and comparing it to how big it actually is. 318 // big each label wants to be, and comparing it to how big it actually is.
319 // Then we shift each label down and resize by the appropriate amount, then 319 // Then we shift each label down and resize by the appropriate amount, then
320 // finally resize the window. 320 // finally resize the window.
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 dataCellForTableColumn:(NSTableColumn*)tableColumn 559 dataCellForTableColumn:(NSTableColumn*)tableColumn
560 item:(id)item { 560 item:(id)item {
561 if (HasAttribute(item, kUseCustomLinkCell)) { 561 if (HasAttribute(item, kUseCustomLinkCell)) {
562 base::scoped_nsobject<DetailToggleHyperlinkButtonCell> cell( 562 base::scoped_nsobject<DetailToggleHyperlinkButtonCell> cell(
563 [[DetailToggleHyperlinkButtonCell alloc] initTextCell:@""]); 563 [[DetailToggleHyperlinkButtonCell alloc] initTextCell:@""]);
564 [cell setTarget:self]; 564 [cell setTarget:self];
565 [cell setLinkClickedAction:@selector(onToggleDetailsLinkClicked:)]; 565 [cell setLinkClickedAction:@selector(onToggleDetailsLinkClicked:)];
566 [cell setAlignment:NSLeftTextAlignment]; 566 [cell setAlignment:NSLeftTextAlignment];
567 [cell setUnderlineOnHover:YES]; 567 [cell setUnderlineOnHover:YES];
568 [cell setTextColor: 568 [cell setTextColor:
569 gfx::SkColorToCalibratedNSColor(chrome_style::GetLinkColor())]; 569 skia::SkColorToCalibratedNSColor(chrome_style::GetLinkColor())];
570 570
571 size_t detailsIndex = 571 size_t detailsIndex =
572 [[item objectForKey:kPermissionsDetailIndex] unsignedIntegerValue]; 572 [[item objectForKey:kPermissionsDetailIndex] unsignedIntegerValue];
573 [cell setPermissionsDetailIndex:detailsIndex]; 573 [cell setPermissionsDetailIndex:detailsIndex];
574 574
575 ExtensionInstallPrompt::DetailsType detailsType = 575 ExtensionInstallPrompt::DetailsType detailsType =
576 static_cast<ExtensionInstallPrompt::DetailsType>( 576 static_cast<ExtensionInstallPrompt::DetailsType>(
577 [[item objectForKey:kPermissionsDetailType] unsignedIntegerValue]); 577 [[item objectForKey:kPermissionsDetailType] unsignedIntegerValue]);
578 [cell setPermissionsDetailType:detailsType]; 578 [cell setPermissionsDetailType:detailsType];
579 579
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 } 852 }
853 853
854 - (void)accessibilityPerformAction:(NSString*)action { 854 - (void)accessibilityPerformAction:(NSString*)action {
855 if ([action isEqualToString:NSAccessibilityPressAction]) 855 if ([action isEqualToString:NSAccessibilityPressAction])
856 [self handleLinkClicked]; 856 [self handleLinkClicked];
857 else 857 else
858 [super accessibilityPerformAction:action]; 858 [super accessibilityPerformAction:action];
859 } 859 }
860 860
861 @end 861 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698