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

Unified Diff: chrome/browser/cocoa/content_settings_dialog_controller.mm

Issue 5238002: Reintegrate 552 r66225-r66645.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552d/src/
Patch Set: '' Created 10 years, 1 month 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/cocoa/content_settings_dialog_controller.mm
===================================================================
--- chrome/browser/cocoa/content_settings_dialog_controller.mm (revision 66837)
+++ chrome/browser/cocoa/content_settings_dialog_controller.mm (working copy)
@@ -187,6 +187,24 @@
label = [label stringByReplacingOccurrencesOfString:@":" withString:@""];
[tabViewPicker_ setHeading:label];
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableClickToPlay)) {
+ // The |pluginsEnabledIndex| property is bound to the selected *tag*,
+ // so we don't have to worry about index shifts when removing a row
+ // from the matrix.
+ [pluginDefaultSettingMatrix_ removeRow:kPluginsAskIndex];
+ NSArray* siblingViews = [[pluginDefaultSettingMatrix_ superview] subviews];
+ for (NSView* view in siblingViews) {
+ NSRect frame = [view frame];
+ if (frame.origin.y < [pluginDefaultSettingMatrix_ frame].origin.y) {
+ frame.origin.y +=
+ ([pluginDefaultSettingMatrix_ cellSize].height +
+ [pluginDefaultSettingMatrix_ intercellSpacing].height);
+ [view setFrame:frame];
+ }
+ }
+ }
+
NSRect frame = [[self window] frame];
frame.origin.y -= windowDelta;
frame.size.height += windowDelta;
@@ -430,9 +448,15 @@
ContentSetting setting =
map->GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS);
switch (setting) {
- case CONTENT_SETTING_ALLOW: return kPluginsAllowIndex;
- case CONTENT_SETTING_ASK: return kPluginsAskIndex;
- case CONTENT_SETTING_BLOCK: return kPluginsBlockIndex;
+ case CONTENT_SETTING_ALLOW:
+ return kPluginsAllowIndex;
+ case CONTENT_SETTING_ASK:
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableClickToPlay))
+ return kPluginsAskIndex;
+ // Fall through to the next case.
+ case CONTENT_SETTING_BLOCK:
+ return kPluginsBlockIndex;
default:
NOTREACHED();
return kPluginsAllowIndex;

Powered by Google App Engine
This is Rietveld 408576698