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

Issue 5564007: Update Content Settings Bubbles (Closed)

Created:
10 years ago by msw
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org, Paweł Hajdan Jr., pam+watch_chromium.org, brettw-cc_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Peter: Please review model, test, and WIN changes. Elliot: Please review GTK changes, referencing model changes. Nico: Please review MAC changes, referencing model changes. Remove horizontal divider in plug-in content setting bubble (WIN,GTK) Add separator after blocked geolocation domain list. Refactor model and layout for simplicity (WIN,GTK,MAC) clear_link, info_link, load_plugins_link_title are now just custom_link. Make proper cookies subclass of ContentSettingTitleLinkAndCustomModel Update unit test to reflect changes and test slightly more. NOTE: Removes an extra vertical space that was between the popups list and the radio group (I can add more space here if desired). NOTE: I would have liked to refactor some more mac code, but that would require modifying the .xibs, which is tough without my own mac dev box... I'll file a bug on this later. NOTE: I addressed all of Peter's earlier comments, except using an enabled bit field. This change supersedes 5592004 and 5563003. BUG=http://code.google.com/p/chromium/issues/detail?id=62188 TEST=Check layout and functionality of content settings bubbles, especially around verticals spacing, horizontal separators, and the buttons "Run all plug-ins this time", "Clear these settings for future visits" (Geolocation), and "Show cookies and other site data". Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=68824

Patch Set 1 #

Total comments: 5

Patch Set 2 : Content Settings Bubble Update #

Patch Set 3 : Reducing the scope of my Mac changes. #

Patch Set 4 : x #

Total comments: 12

Patch Set 5 : Fixing test syntax, custom_link_enabled & ContentSettingBubbleContents init #

Patch Set 6 : Address CR feedback, fix tests #

Total comments: 12

Patch Set 7 : Address additional CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -299 lines) Patch
M chrome/browser/content_setting_bubble_model.h View 1 3 chunks +9 lines, -19 lines 0 comments Download
M chrome/browser/content_setting_bubble_model.cc View 1 2 3 4 5 6 9 chunks +79 lines, -74 lines 0 comments Download
M chrome/browser/content_setting_bubble_model_unittest.cc View 1 2 3 4 5 4 chunks +19 lines, -27 lines 0 comments Download
M chrome/browser/gtk/content_setting_bubble_gtk.h View 1 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/gtk/content_setting_bubble_gtk.cc View 1 3 chunks +20 lines, -56 lines 0 comments Download
M chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm View 1 2 3 4 5 6 3 chunks +42 lines, -35 lines 0 comments Download
M chrome/browser/ui/views/content_setting_bubble_contents.h View 1 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/content_setting_bubble_contents.cc View 1 2 3 4 7 chunks +39 lines, -78 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
msw
Please review my TENTATIVE change to guide me... Corresponding changes required for Linux&Mac layout. http://codereview.chromium.org/5564007/diff/1/chrome/browser/content_setting_bubble_model.cc ...
10 years ago (2010-12-07 03:28:58 UTC) #1
Peter Kasting
http://codereview.chromium.org/5564007/diff/1/chrome/browser/content_setting_bubble_model.cc File chrome/browser/content_setting_bubble_model.cc (right): http://codereview.chromium.org/5564007/diff/1/chrome/browser/content_setting_bubble_model.cc#newcode149 chrome/browser/content_setting_bubble_model.cc:149: DCHECK(content_type() == CONTENT_SETTINGS_TYPE_COOKIES); Nit: Now that we've combined all ...
10 years ago (2010-12-07 17:53:00 UTC) #2
Nico
http://codereview.chromium.org/5564007/diff/14001/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm File chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm (right): http://codereview.chromium.org/5564007/diff/14001/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm#newcode333 chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm:333: control = button.release(); This is wrong – please read ...
10 years ago (2010-12-09 06:41:46 UTC) #3
Nico
Also, all CL descriptions should have a BUG= and a TEST= line (and there probably ...
10 years ago (2010-12-09 06:44:39 UTC) #4
Elliot Glaysher
Gtk UI changes LGTM.
10 years ago (2010-12-09 17:32:27 UTC) #5
Peter Kasting
Since you're abandoning them, you should go back to changes 5592004 and 5563003 and close ...
10 years ago (2010-12-09 17:56:34 UTC) #6
msw
I've addressed all the CR comments, fixed up the tests, and fixed a couple minor ...
10 years ago (2010-12-10 00:34:18 UTC) #7
Nico
Mac parts LG http://codereview.chromium.org/5564007/diff/28001/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm File chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm (right): http://codereview.chromium.org/5564007/diff/28001/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm#newcode326 chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm:326: control.reset(static_cast<NSControl*>(button)); NSButton is derived from NSControl, ...
10 years ago (2010-12-10 00:41:42 UTC) #8
Peter Kasting
LGTM http://codereview.chromium.org/5564007/diff/28001/chrome/browser/content_setting_bubble_model.cc File chrome/browser/content_setting_bubble_model.cc (right): http://codereview.chromium.org/5564007/diff/28001/chrome/browser/content_setting_bubble_model.cc#newcode309 chrome/browser/content_setting_bubble_model.cc:309: ContentSettingPluginBubbleModel(TabContents* tab_contents, Profile* profile, Nit: Can you fix ...
10 years ago (2010-12-10 00:57:24 UTC) #9
msw
10 years ago (2010-12-10 03:32:05 UTC) #10
I addressed your additional CR feedback.
These changes look good locally and ran through git try clean.
If they still LGTYall, help me land my first change!
Mike

http://codereview.chromium.org/5564007/diff/28001/chrome/browser/content_sett...
File chrome/browser/content_setting_bubble_model.cc (right):

http://codereview.chromium.org/5564007/diff/28001/chrome/browser/content_sett...
chrome/browser/content_setting_bubble_model.cc:309:
ContentSettingPluginBubbleModel(TabContents* tab_contents, Profile* profile,
On 2010/12/10 00:57:24, Peter Kasting wrote:
> Nit: Can you fix the arg wrapping here too?

Done, also caught ContentSettingTitleAndLinkModel and ContentSettingBubbleModel.

http://codereview.chromium.org/5564007/diff/28001/chrome/browser/content_sett...
chrome/browser/content_setting_bubble_model.cc:315:
set_custom_link_enabled(!settings || settings->load_plugins_link_enabled());
On 2010/12/10 00:57:24, Peter Kasting wrote:
> How about we just do:
> 
>   set_custom_link_enabled(tab_contents && tab_contents->
>       GetTabSpecificContentSettings()->load_plugins_link_enabled());
> 
> ...because even if |tab_contents| can be NULL it makes no sense to have a link
> in that case...
> 
> This would also mean you could DCHECK(tab_contents()) in
OnCustomLinkClicked(),
> instead of conditionalizing it.

Done, also refactored OnCustomLinkClicked() slightly.

http://codereview.chromium.org/5564007/diff/28001/chrome/browser/content_sett...
chrome/browser/content_setting_bubble_model.cc:333:
ContentSettingPopupBubbleModel(TabContents* tab_contents, Profile* profile,
On 2010/12/10 00:57:24, Peter Kasting wrote:
> Nit: And fix arg wrapping here

Done.

http://codereview.chromium.org/5564007/diff/28001/chrome/browser/ui/cocoa/con...
File chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm (right):

http://codereview.chromium.org/5564007/diff/28001/chrome/browser/ui/cocoa/con...
chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm:326:
control.reset(static_cast<NSControl*>(button));
On 2010/12/10 00:41:42, Nico wrote:
> NSButton is derived from NSControl, you shouldn't need a cast here

Done.

http://codereview.chromium.org/5564007/diff/28001/chrome/browser/ui/cocoa/con...
chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm:333: } else {
Previously this text was delivered as an extra geolocation domain list title...
I revised that strange behavior to favor an explicit string and text field.

On 2010/12/10 00:41:42, Nico wrote:
> Why is this branch required now but wasn't previously? Was the text just
> missing?

http://codereview.chromium.org/5564007/diff/28001/chrome/browser/ui/cocoa/con...
chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm:337:
control.reset(static_cast<NSControl*>([customText retain]));
On 2010/12/10 00:41:42, Nico wrote:
> Same here. Since you don't call NSTextField-specific methods on customText,
you
> can probably do
> 
> control.reset([LabelWithFrame(base::SysUTF8ToNSString(content.custom_link),
> frame) retrain]);
> SetControlSize(control.get(), NSSmallControlSize);

Done.

Powered by Google App Engine
This is Rietveld 408576698