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

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..085e3733a3be9ff68f7785246f225f33ed2c1a72 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
@@ -236,6 +236,10 @@ bool IsInternalURL(const GURL& url) {
return self;
}
+- (Profile*)profile {
+ return Profile::FromBrowserContext(webContents_->GetBrowserContext());
+}
+
- (void)windowWillClose:(NSNotification*)notification {
if (presenter_.get())
presenter_->OnUIClosing();
@@ -737,12 +741,14 @@ bool IsInternalURL(const GURL& url) {
base::scoped_nsobject<PermissionSelectorButton> button(
[[PermissionSelectorButton alloc] initWithPermissionInfo:permissionInfo
forURL:url
- withCallback:callback]);
+ withCallback:callback
+ profile:[self 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
+ profile:[self profile]];
// Ensure the containing view is large enough to contain the button with its
// widest possible title.

Powered by Google App Engine
This is Rietveld 408576698