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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings_bubble_controller.mm

Issue 112913004: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
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/website_settings_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/website_settings_bubble_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #import <AppKit/AppKit.h> 9 #import <AppKit/AppKit.h>
10 10
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 NSImage* image = WebsiteSettingsUI::GetPermissionIcon( 957 NSImage* image = WebsiteSettingsUI::GetPermissionIcon(
958 permissionInfo.type, setting).ToNSImage(); 958 permissionInfo.type, setting).ToNSImage();
959 NSImageView* imageView = [self addImageWithSize:[image size] 959 NSImageView* imageView = [self addImageWithSize:[image size]
960 toView:view 960 toView:view
961 atPoint:point]; 961 atPoint:point];
962 [imageView setImage:image]; 962 [imageView setImage:image];
963 point.x += kPermissionImageSize + kPermissionImageSpacing; 963 point.x += kPermissionImageSize + kPermissionImageSpacing;
964 964
965 base::string16 labelText = 965 base::string16 labelText =
966 WebsiteSettingsUI::PermissionTypeToUIString(permissionInfo.type) + 966 WebsiteSettingsUI::PermissionTypeToUIString(permissionInfo.type) +
967 ASCIIToUTF16(":"); 967 base::ASCIIToUTF16(":");
968 968
969 NSTextField* label = [self addText:labelText 969 NSTextField* label = [self addText:labelText
970 withSize:[NSFont smallSystemFontSize] 970 withSize:[NSFont smallSystemFontSize]
971 bold:NO 971 bold:NO
972 toView:view 972 toView:view
973 atPoint:point]; 973 atPoint:point];
974 [label sizeToFit]; 974 [label sizeToFit];
975 NSPoint popUpPosition = NSMakePoint(NSMaxX([label frame]), point.y); 975 NSPoint popUpPosition = NSMakePoint(NSMaxX([label frame]), point.y);
976 NSPopUpButton* button = [self addPopUpButtonForPermission:permissionInfo 976 NSPopUpButton* button = [self addPopUpButtonForPermission:permissionInfo
977 toView:view 977 toView:view
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 NSImage* image = WebsiteSettingsUI::GetPermissionIcon( 1022 NSImage* image = WebsiteSettingsUI::GetPermissionIcon(
1023 CONTENT_SETTINGS_TYPE_COOKIES, CONTENT_SETTING_ALLOW).ToNSImage(); 1023 CONTENT_SETTINGS_TYPE_COOKIES, CONTENT_SETTING_ALLOW).ToNSImage();
1024 NSImageView* imageView = [self addImageWithSize:[image size] 1024 NSImageView* imageView = [self addImageWithSize:[image size]
1025 toView:view 1025 toView:view
1026 atPoint:point]; 1026 atPoint:point];
1027 [imageView setImage:image]; 1027 [imageView setImage:image];
1028 point.x += kPermissionImageSize + kPermissionImageSpacing; 1028 point.x += kPermissionImageSize + kPermissionImageSpacing;
1029 1029
1030 base::string16 labelText = l10n_util::GetStringFUTF16( 1030 base::string16 labelText = l10n_util::GetStringFUTF16(
1031 IDS_WEBSITE_SETTINGS_SITE_DATA_STATS_LINE, 1031 IDS_WEBSITE_SETTINGS_SITE_DATA_STATS_LINE,
1032 UTF8ToUTF16(cookieInfo.cookie_source), 1032 base::UTF8ToUTF16(cookieInfo.cookie_source),
1033 base::IntToString16(cookieInfo.allowed), 1033 base::IntToString16(cookieInfo.allowed),
1034 base::IntToString16(cookieInfo.blocked)); 1034 base::IntToString16(cookieInfo.blocked));
1035 1035
1036 NSTextField* label = [self addText:labelText 1036 NSTextField* label = [self addText:labelText
1037 withSize:[NSFont smallSystemFontSize] 1037 withSize:[NSFont smallSystemFontSize]
1038 bold:NO 1038 bold:NO
1039 toView:view 1039 toView:view
1040 atPoint:point]; 1040 atPoint:point];
1041 1041
1042 // Align the icon with the text. 1042 // Align the icon with the text.
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 [bubble_controller_ setPermissionInfo:permission_info_list]; 1228 [bubble_controller_ setPermissionInfo:permission_info_list];
1229 } 1229 }
1230 1230
1231 void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) { 1231 void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) {
1232 [bubble_controller_ setFirstVisit:first_visit]; 1232 [bubble_controller_ setFirstVisit:first_visit];
1233 } 1233 }
1234 1234
1235 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { 1235 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) {
1236 [bubble_controller_ setSelectedTab:tab_id]; 1236 [bubble_controller_ setSelectedTab:tab_id];
1237 } 1237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698