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

Unified Diff: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm

Issue 11488009: Add content settings page action for Pepper broker authorization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 10 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/content_settings/content_setting_bubble_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
index ab08960326129c004ce3a0926543a2dbd7f8d42d..d4ad48ca7289db3e6aab9b5691f6e19b8ffc65e0 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
@@ -90,7 +90,7 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
- (void)initializePopupList;
- (void)initializeGeoLists;
- (void)sizeToFitLoadButton;
-- (void)sizeToFitManageDoneButtons;
+- (void)initManageDoneButtons;
- (void)removeInfoButton;
- (void)popupLinkClicked:(id)sender;
- (void)clearGeolocationForCurrentHost:(id)sender;
@@ -122,9 +122,9 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
case CONTENT_SETTINGS_TYPE_COOKIES:
nibPath = @"ContentBlockedCookies"; break;
case CONTENT_SETTINGS_TYPE_IMAGES:
- nibPath = @"ContentBlockedImages"; break;
case CONTENT_SETTINGS_TYPE_JAVASCRIPT:
- nibPath = @"ContentBlockedJavaScript"; break;
+ case CONTENT_SETTINGS_TYPE_PPAPI_BROKER:
+ nibPath = @"ContentBlockedSimple"; break;
case CONTENT_SETTINGS_TYPE_PLUGINS:
nibPath = @"ContentBlockedPlugins"; break;
case CONTENT_SETTINGS_TYPE_POPUPS:
@@ -146,7 +146,6 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
case CONTENT_SETTINGS_TYPE_MOUSELOCK:
case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC:
case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA:
- case CONTENT_SETTINGS_TYPE_PPAPI_BROKER:
case CONTENT_SETTINGS_NUM_TYPES:
NOTREACHED();
}
@@ -417,7 +416,12 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
}
}
-- (void)sizeToFitManageDoneButtons {
+- (void)initManageDoneButtons {
+ const ContentSettingBubbleModel::BubbleContent& content =
+ contentSettingBubbleModel_->bubble_content();
+ [manageButton_ setTitle:base::SysUTF8ToNSString(content.manage_link)];
+ [GTMUILocalizerAndLayoutTweaker sizeToFitView:manageButton_];
+
CGFloat actualWidth = NSWidth([[[self window] contentView] frame]);
CGFloat requiredWidth = NSMaxX([manageButton_ frame]) + kManageDonePadding +
NSWidth([[doneButton_ superview] frame]) - NSMinX([doneButton_ frame]);
@@ -439,7 +443,7 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
[[self bubble] setArrowLocation:info_bubble::kTopRight];
// Adapt window size to bottom buttons. Do this before all other layouting.
- [self sizeToFitManageDoneButtons];
+ [self initManageDoneButtons];
[self initializeTitle];
« no previous file with comments | « chrome/browser/pepper_broker_infobar_delegate.cc ('k') | chrome/browser/ui/content_settings/content_setting_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698