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

Unified Diff: chrome/browser/ui/cocoa/website_settings/permission_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/permission_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
index bc593c1bfb61cda12898ea55b013bb008f06be50..bf3aa9a5235823a1c5fe81cb98daa5074d8cc323 100644
--- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
@@ -84,7 +84,8 @@ const NSInteger kFullscreenLeftOffset = 40;
- (id)initForURL:(const GURL&)url
allowed:(BOOL)allow
index:(int)index
- delegate:(PermissionPrompt::Delegate*)delegate;
+ delegate:(PermissionPrompt::Delegate*)delegate
+ forProfile:(Profile*)profile;
groby-ooo-7-16 2016/10/10 05:50:07 Tiny nit: I'd call this profile: instead of forPro
raymes 2016/10/10 06:02:17 Done. Thanks I'm not familiar with objective C sty
// Returns the maximum width of its possible titles.
- (CGFloat)maximumTitleWidth;
@@ -95,7 +96,8 @@ const NSInteger kFullscreenLeftOffset = 40;
- (id)initForURL:(const GURL&)url
allowed:(BOOL)allow
index:(int)index
- delegate:(PermissionPrompt::Delegate*)delegate {
+ delegate:(PermissionPrompt::Delegate*)delegate
+ forProfile:(Profile*)profile {
groby-ooo-7-16 2016/10/10 05:50:07 nit: see above
raymes 2016/10/10 06:02:17 Done.
if (self = [super initWithFrame:NSZeroRect pullsDown:NO]) {
ContentSetting setting =
allow ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK;
@@ -113,7 +115,8 @@ const NSInteger kFullscreenLeftOffset = 40;
[blockSelf title])];
});
- menuModel_.reset(new PermissionMenuModel(url, setting, changeCallback));
+ menuModel_.reset(
+ new PermissionMenuModel(profile, url, setting, changeCallback));
menuController_.reset([[MenuController alloc] initWithModel:menuModel_.get()
useWithPopUpButtonCell:NO]);
[self setMenu:[menuController_ menu]];
@@ -575,11 +578,12 @@ const NSInteger kFullscreenLeftOffset = 40;
allow:(BOOL)allow {
DCHECK(request);
DCHECK(delegate_);
- base::scoped_nsobject<AllowBlockMenuButton> button(
- [[AllowBlockMenuButton alloc] initForURL:request->GetOrigin()
- allowed:allow
- index:index
- delegate:delegate_]);
+ base::scoped_nsobject<AllowBlockMenuButton> button([
+ [AllowBlockMenuButton alloc] initForURL:request->GetOrigin()
+ allowed:allow
+ index:index
+ delegate:delegate_
+ forProfile:browser_->profile()]);
return button.autorelease();
}

Powered by Google App Engine
This is Rietveld 408576698