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

Unified Diff: chrome/browser/ui/cocoa/page_info/permission_selector_button.mm

Issue 2754383004: Rename WebsiteSettings code to PageInfo. (Closed)
Patch Set: Upload missing comment fix for WebSettingsUI -> PageInfoUI. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/page_info/permission_selector_button.mm
diff --git a/chrome/browser/ui/cocoa/page_info/permission_selector_button.mm b/chrome/browser/ui/cocoa/page_info/permission_selector_button.mm
index 46ec36d1e09eb713baed9227b726ff3d94cfb9b1..cb2f1761d2ddc4b926de002399cfbd1a33f84157 100644
--- a/chrome/browser/ui/cocoa/page_info/permission_selector_button.mm
+++ b/chrome/browser/ui/cocoa/page_info/permission_selector_button.mm
@@ -5,14 +5,13 @@
#import "chrome/browser/ui/cocoa/page_info/permission_selector_button.h"
#include "base/strings/sys_string_conversions.h"
-#include "chrome/browser/ui/cocoa/page_info/website_settings_utils_cocoa.h"
-#include "chrome/browser/ui/page_info/website_settings_ui.h"
+#include "chrome/browser/ui/cocoa/page_info/page_info_utils_cocoa.h"
+#include "chrome/browser/ui/page_info/page_info_ui.h"
#import "ui/base/cocoa/menu_controller.h"
@implementation PermissionSelectorButton
-- (id)initWithPermissionInfo:
- (const WebsiteSettingsUI::PermissionInfo&)permissionInfo
+- (id)initWithPermissionInfo:(const PageInfoUI::PermissionInfo&)permissionInfo
forURL:(const GURL&)url
withCallback:(PermissionMenuModel::ChangeCallback)callback
profile:(Profile*)profile {
@@ -31,7 +30,7 @@
// Set the button title.
base::scoped_nsobject<NSMenuItem> titleItem([[NSMenuItem alloc] init]);
- base::string16 buttonTitle = WebsiteSettingsUI::PermissionActionToUIString(
+ base::string16 buttonTitle = PageInfoUI::PermissionActionToUIString(
profile, permissionInfo.type, permissionInfo.setting,
permissionInfo.default_setting, permissionInfo.source);
[titleItem setTitle:base::SysUTF16ToNSString(buttonTitle)];
@@ -41,7 +40,7 @@
[self sizeToFit];
// Size the button to just fit the visible title - not all of its items.
- [self setFrameSize:SizeForWebsiteSettingsButtonTitle(self, [self title])];
+ [self setFrameSize:SizeForPageInfoButtonTitle(self, [self title])];
}
return self;
}
@@ -53,10 +52,10 @@
CGFloat maxTitleWidth = 0;
for (NSMenuItem* item in [self itemArray]) {
NSString* title =
- base::SysUTF16ToNSString(WebsiteSettingsUI::PermissionActionToUIString(
+ base::SysUTF16ToNSString(PageInfoUI::PermissionActionToUIString(
profile, type, static_cast<ContentSetting>([item tag]),
defaultSetting, content_settings::SETTING_SOURCE_USER));
- NSSize size = SizeForWebsiteSettingsButtonTitle(self, title);
+ NSSize size = SizeForPageInfoButtonTitle(self, title);
maxTitleWidth = std::max(maxTitleWidth, size.width);
}
return maxTitleWidth;

Powered by Google App Engine
This is Rietveld 408576698