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

Unified Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm

Issue 2408613002: Replace kPreferHtmlOverPlugins feature checks with PluginUtils::ShouldPreferHtmlOverPlugi… (Closed)
Patch Set: Replace remaining kPreferHtmlOverPlugins feature checks with PluginUtils::ShouldPreferHtmlOverPlugi… Created 4 years, 2 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/website_settings/website_settings_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
index a6a2128724f92a3941a32e8b7fbfedf41b6704d3..3f8c6311bdaf2df19eaf843f5d44a2cffeffc843 100644
--- a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
@@ -192,6 +192,7 @@ bool IsInternalURL(const GURL& url) {
- (id)initWithParentWindow:(NSWindow*)parentWindow
websiteSettingsUIBridge:(WebsiteSettingsUIBridge*)bridge
webContents:(content::WebContents*)webContents
+ forProfile:(Profile*)profile
url:(const GURL&)url
isDevToolsDisabled:(BOOL)isDevToolsDisabled {
DCHECK(parentWindow);
@@ -200,6 +201,7 @@ bool IsInternalURL(const GURL& url) {
permissionsPresent_ = NO;
isDevToolsDisabled_ = isDevToolsDisabled;
url_ = url;
+ profile_ = profile;
// Use an arbitrary height; it will be changed in performLayout.
NSRect contentRect = NSMakeRect(0, 0, [self defaultWindowWidth], 1);
@@ -737,12 +739,14 @@ bool IsInternalURL(const GURL& url) {
base::scoped_nsobject<PermissionSelectorButton> button(
[[PermissionSelectorButton alloc] initWithPermissionInfo:permissionInfo
forURL:url
- withCallback:callback]);
+ withCallback:callback
+ forProfile:profile_]);
// Determine the largest possible size for this button.
- CGFloat maxTitleWidth = [button
- maxTitleWidthForContentSettingsType:permissionInfo.type
- withDefaultSetting:permissionInfo.default_setting];
+ CGFloat maxTitleWidth =
+ [button maxTitleWidthForContentSettingsType:permissionInfo.type
+ withDefaultSetting:permissionInfo.default_setting
+ forProfile:profile_];
// Ensure the containing view is large enough to contain the button with its
// widest possible title.
@@ -1155,6 +1159,7 @@ void WebsiteSettingsUIBridge::Show(
initWithParentWindow:parent
websiteSettingsUIBridge:bridge
webContents:web_contents
+ forProfile:profile
url:virtual_url
isDevToolsDisabled:is_devtools_disabled];

Powered by Google App Engine
This is Rietveld 408576698