| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/website_settings_bubble_contro
ller.h" | 5 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro
ller.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #import <AppKit/AppKit.h> | 9 #import <AppKit/AppKit.h> |
| 10 | 10 |
| (...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 | 1348 |
| 1349 // Reset X for the cookie image. | 1349 // Reset X for the cookie image. |
| 1350 if (isRTL) { | 1350 if (isRTL) { |
| 1351 controlOrigin.x = viewWidth - kPermissionImageSize - | 1351 controlOrigin.x = viewWidth - kPermissionImageSize - |
| 1352 kPermissionImageSpacing - kFramePadding; | 1352 kPermissionImageSpacing - kFramePadding; |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 WebsiteSettingsUI::PermissionInfo info; | 1355 WebsiteSettingsUI::PermissionInfo info; |
| 1356 info.type = CONTENT_SETTINGS_TYPE_COOKIES; | 1356 info.type = CONTENT_SETTINGS_TYPE_COOKIES; |
| 1357 info.setting = CONTENT_SETTING_ALLOW; | 1357 info.setting = CONTENT_SETTING_ALLOW; |
| 1358 // info.default_setting, info.source, and info.is_incognito have not been set, |
| 1359 // but GetPermissionIcon doesn't use any of those. |
| 1358 NSImage* image = WebsiteSettingsUI::GetPermissionIcon(info).ToNSImage(); | 1360 NSImage* image = WebsiteSettingsUI::GetPermissionIcon(info).ToNSImage(); |
| 1359 NSImageView* imageView = [self addImageWithSize:[image size] | 1361 NSImageView* imageView = [self addImageWithSize:[image size] |
| 1360 toView:cookiesView_ | 1362 toView:cookiesView_ |
| 1361 atPoint:controlOrigin]; | 1363 atPoint:controlOrigin]; |
| 1362 [imageView setImage:image]; | 1364 [imageView setImage:image]; |
| 1363 | 1365 |
| 1364 base::string16 comma = base::ASCIIToUTF16(", "); | 1366 base::string16 comma = base::ASCIIToUTF16(", "); |
| 1365 NSString* cookieButtonText = base::SysUTF16ToNSString(firstPartyLabelText); | 1367 NSString* cookieButtonText = base::SysUTF16ToNSString(firstPartyLabelText); |
| 1366 | 1368 |
| 1367 if (isRTL) { | 1369 if (isRTL) { |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 void WebsiteSettingsUIBridge::SetPermissionInfo( | 1540 void WebsiteSettingsUIBridge::SetPermissionInfo( |
| 1539 const PermissionInfoList& permission_info_list, | 1541 const PermissionInfoList& permission_info_list, |
| 1540 const ChosenObjectInfoList& chosen_object_info_list) { | 1542 const ChosenObjectInfoList& chosen_object_info_list) { |
| 1541 [bubble_controller_ setPermissionInfo:permission_info_list | 1543 [bubble_controller_ setPermissionInfo:permission_info_list |
| 1542 andChosenObjects:chosen_object_info_list]; | 1544 andChosenObjects:chosen_object_info_list]; |
| 1543 } | 1545 } |
| 1544 | 1546 |
| 1545 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { | 1547 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { |
| 1546 [bubble_controller_ setSelectedTab:tab_id]; | 1548 [bubble_controller_ setSelectedTab:tab_id]; |
| 1547 } | 1549 } |
| OLD | NEW |