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

Issue 650180: Initial Geolocation location bar icons. (Closed)

Created:
10 years, 10 months ago by bulach
Modified:
9 years, 7 months ago
Reviewers:
CC:
chromium-reviews_googlegroups.com, brettw+cc_chromium.org, darin+cc_chromium.org, ben+cc_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org, jam, jam+cc_chromium.org
Visibility:
Public.

Description

Initial Geolocation location bar icons. (see design doc and UI mocks: https://docs.google.com/View?id=dfbnm49n_0dpc7pxpx ) Moves GeolocationPermissionContext up to profile. Adds Geolocation icons and bubbles to location bar. TEST=chrome/browser/geolocation/geolocation_browsertest.cc BUG=37206

Patch Set 1 : Adds support for multiple frames. #

Total comments: 67

Patch Set 2 : Addresses joth's comments #

Total comments: 18

Patch Set 3 : More comments #

Total comments: 25

Patch Set 4 : More comments #

Patch Set 5 : Jorlow's comments #

Patch Set 6 : Uses ContentSettingImageView. #

Total comments: 26

Patch Set 7 : Previous comments #

Patch Set 8 : Merge with other changes. #

Total comments: 74

Patch Set 9 : Addresses Peter and Brett's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+876 lines, -367 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 4 chunks +46 lines, -5 lines 0 comments Download
M chrome/app/theme/theme_resources.grd View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/content_setting_bubble_model.cc View 8 2 chunks +200 lines, -126 lines 0 comments Download
M chrome/browser/content_setting_image_model.cc View 8 2 chunks +80 lines, -26 lines 0 comments Download
M chrome/browser/geolocation/geolocation_browsertest.cc View 2 3 4 5 6 7 6 chunks +12 lines, -18 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context.h View 1 2 3 4 5 6 7 3 chunks +16 lines, -39 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context.cc View 1 2 3 4 5 6 7 8 7 chunks +47 lines, -142 lines 0 comments Download
M chrome/browser/gtk/content_blocked_bubble_gtk.cc View 7 2 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/gtk/options/content_exceptions_window_gtk.cc View 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/gtk/options/content_settings_window_gtk.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/gtk/options/content_settings_window_gtk.cc View 7 4 chunks +16 lines, -2 lines 0 comments Download
A chrome/browser/gtk/options/geolocation_filter_page_gtk.h View 7 8 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/browser/gtk/options/geolocation_filter_page_gtk.cc View 7 8 1 chunk +109 lines, -0 lines 0 comments Download
M chrome/browser/host_content_settings_map.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/profile.h View 1 2 3 4 5 6 7 4 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/profile.cc View 1 2 3 4 5 6 7 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.h View 1 2 3 4 5 6 7 8 5 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 1 2 3 4 5 6 7 8 4 chunks +27 lines, -0 lines 0 comments Download
M chrome/browser/views/content_blocked_bubble_contents.cc View 6 7 1 chunk +7 lines, -1 line 0 comments Download
M chrome/browser/views/options/content_settings_window_view.cc View 2 3 4 5 6 3 chunks +14 lines, -2 lines 0 comments Download
chrome/browser/views/options/exceptions_view.cc View 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/views/options/geolocation_filter_page_view.h View 2 3 4 5 6 7 8 1 chunk +48 lines, -0 lines 0 comments Download
A chrome/browser/views/options/geolocation_filter_page_view.cc View 2 3 4 5 6 7 8 1 chunk +133 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
chrome/common/content_settings_types.h View 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/testing_profile.h View 1 2 3 4 5 6 7 3 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
joth
Overall looks good to me, some suggestions below. Needs some feedback from someone more familiar ...
10 years, 10 months ago (2010-02-24 13:09:13 UTC) #1
bulach
thanks joth! all comments addressed, and I had to include "GeolocationFilterPageView", which is the tab ...
10 years, 10 months ago (2010-02-24 18:12:55 UTC) #2
joth
Nice! Thanks http://codereview.chromium.org/650180/diff/4001/4020 File chrome/browser/views/location_bar_view.cc (right): http://codereview.chromium.org/650180/diff/4001/4020#newcode1489 chrome/browser/views/location_bar_view.cc:1489: // 4. Multiple sites are blocked from ...
10 years, 10 months ago (2010-02-24 19:41:23 UTC) #3
bulach
+jorlow Thanks joth! all comments addressed. jorlow: would you mind taking a quick look at ...
10 years, 10 months ago (2010-02-24 21:35:49 UTC) #4
jorlow
Some comments. Still need to look at the meat tho. This CL is really too ...
10 years, 10 months ago (2010-02-24 22:26:31 UTC) #5
bulach
thanks Jeremy! apologies for the biggie, I hope next CLs will be more manageable.. another ...
10 years, 10 months ago (2010-02-24 23:49:10 UTC) #6
jorlow
http://codereview.chromium.org/650180/diff/6004/6019 File chrome/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/650180/diff/6004/6019#newcode2043 chrome/browser/tab_contents/tab_contents.cc:2043: // TODO(bulach): split OnBlockedContentChange from OnGeolocationContentChange. On 2010/02/24 23:49:10, ...
10 years, 10 months ago (2010-02-25 09:14:21 UTC) #7
bulach
thanks Jeremy! converged things as you suggested, once you're happy with it I'll replicate in ...
10 years, 10 months ago (2010-02-25 15:19:50 UTC) #8
jorlow
I don't have the patience to do as thorough of a review of this as ...
10 years, 10 months ago (2010-02-25 16:54:41 UTC) #9
joth
One quick comment.... :) http://codereview.chromium.org/650180/diff/6071/7089 File chrome/browser/views/location_bar_view.cc (right): http://codereview.chromium.org/650180/diff/6071/7089#newcode1361 chrome/browser/views/location_bar_view.cc:1361: if (!blocked_icons_[CONTENT_SETTINGS_TYPE_COOKIES]) { maybe clearer ...
10 years, 10 months ago (2010-02-26 15:29:54 UTC) #10
bulach
Hi, First of all, many thanks for putting up with such a huge change: unfortunately ...
10 years, 10 months ago (2010-02-26 21:06:56 UTC) #11
bulach
FYI, split this into two changes: http://codereview.chromium.org/661272/show http://codereview.chromium.org/661273/show once they're in, this change will hopefully ...
10 years, 9 months ago (2010-03-01 13:43:58 UTC) #12
jorlow
Thanks for doing that. Took a quick look and didn't see any issues, though I ...
10 years, 9 months ago (2010-03-01 13:54:38 UTC) #13
bulach
Thanks for the advise! I'll split this further and add the dialog bits required for ...
10 years, 9 months ago (2010-03-01 15:04:28 UTC) #14
bulach
FYI, another change with a smaller scope, in preparation for this: http://codereview.chromium.org/660279/show I'm happy with ...
10 years, 9 months ago (2010-03-01 18:02:18 UTC) #15
Peter Kasting
Please do not hijack the content blocked icons array to shoehorn geolocation icons into it. ...
10 years, 9 months ago (2010-03-02 01:48:19 UTC) #16
Peter Kasting
Belay my last comment. I'd like to see the mocks for this and screenshots of ...
10 years, 9 months ago (2010-03-02 01:55:25 UTC) #17
jorlow
Peter, you don't think we're going to have other privacy related things in the future ...
10 years, 9 months ago (2010-03-02 10:24:24 UTC) #18
bulach
Thanks for your comments, Peter! As Jeremy said, I'm splitting this up in smaller pieces, ...
10 years, 9 months ago (2010-03-02 10:37:38 UTC) #19
bulach
Hi Peter, Thanks for the meeting today, I appreciate your help and the clarifications you ...
10 years, 9 months ago (2010-03-02 19:24:02 UTC) #20
Peter Kasting
On Tue, Mar 2, 2010 at 11:24 AM, <bulach@chromium.org> wrote: > To help your review, ...
10 years, 9 months ago (2010-03-02 22:18:14 UTC) #21
bulach
I'll be doing the full-merge in the following hours, but I'd appreciate your comments on ...
10 years, 9 months ago (2010-03-04 12:01:45 UTC) #22
Peter Kasting
On 2010/03/04 12:01:45, bulach wrote: > I'll be doing the full-merge in the following hours, ...
10 years, 9 months ago (2010-03-04 19:41:59 UTC) #23
bulach
Hi all, I merged with the other changes and cleaned up this change. I think ...
10 years, 9 months ago (2010-03-09 17:35:18 UTC) #24
Peter Kasting
I started to review this but stalled with the UI discussion. Let me make a ...
10 years, 9 months ago (2010-03-09 20:34:01 UTC) #25
brettw
Random style comments for some files... http://codereview.chromium.org/650180/diff/12027/15020 File chrome/browser/tab_contents/tab_contents.h (right): http://codereview.chromium.org/650180/diff/12027/15020#newcode246 chrome/browser/tab_contents/tab_contents.h:246: get_geolocation_content_settings() const; getter ...
10 years, 9 months ago (2010-03-09 20:42:18 UTC) #26
Peter Kasting
Oh heck, I might as well send my full set of comments. Some of these ...
10 years, 9 months ago (2010-03-09 21:56:24 UTC) #27
bulach
Hi Peter, Brett, I addressed all your comments so far. One thing that I'd like ...
10 years, 9 months ago (2010-03-10 15:32:24 UTC) #28
bulach
http://codereview.chromium.org/650180/diff/12027/15001 File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/650180/diff/12027/15001#newcode6724 chrome/app/generated_resources.grd:6724: </ph> wants to track your physical location On 2010/03/09 ...
10 years, 9 months ago (2010-03-10 15:33:24 UTC) #29
Peter Kasting
10 years, 9 months ago (2010-03-10 20:52:03 UTC) #30
Since UI is still up in the air it's hard to move forward, but here's some
replies.

Note that if my most recent UI proposal is accepted, we won't be creating a
geolocation bubble at all, just the icon.  OTOH maybe everyone will still hate
it...

http://codereview.chromium.org/650180/diff/12027/15002
File chrome/app/theme/theme_resources.grd (right):

http://codereview.chromium.org/650180/diff/12027/15002#newcode325
chrome/app/theme/theme_resources.grd:325: <include
name="IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON"
file="geolocation_allowed_locationbar_icon.png" type="BINDATA" />
On 2010/03/10 15:33:25, bulach wrote:
> On 2010/03/09 21:56:24, Peter Kasting wrote:
> > Nit: Maybe these should be located with, and named (on disk and as
> identifiers)
> > similar to, IDR_BLOCKED_COOKIES and friends?
> 
> cookies don't have "allowed" equivalent. if you don't feel strongly about it
I'd
> prefer to keep as it is, or do as a follow-up just with this renaming?

I don't feel terribly strongly, it just seems weirder to me to have 5 types of
content settings icons with one name scheme and one with another than it does to
have six types of icons with the same names, only one of which has an "allowed"
partner...

http://codereview.chromium.org/650180/diff/12027/15005
File chrome/browser/geolocation/geolocation_browsertest.cc (right):

http://codereview.chromium.org/650180/diff/12027/15005#newcode293
chrome/browser/geolocation/geolocation_browsertest.cc:293: // callback is
triggered.
On 2010/03/10 15:33:25, bulach wrote:
> On 2010/03/09 21:56:24, Peter Kasting wrote:
> > What?  This isn't good behavior.  We shouldn't just silently do nothing when
> the
> > user is OTR.  We should behave like we normally do.  This is something we
> > discussed for the other content settings already.
> 
> not sure I understood: I changed this test to reflect the
HostContentSettingsMap
> persistence, that is:
> 1. go to http://example.com
> 2. allow geolocation.
> 3. go OTR, and go to example.com: geolocation should be allowed.
> 
> afaict, this is the same behavior for images and other content type?

Maybe I'm confused.  All I want to make sure of is that, when you visit a site
wanting geolocation data (that you have not yet Allowed) while OTR, we prompt
you like we would when not OTR, and persist the setting if you choose that.  As
long as that happens I'm happy.

http://codereview.chromium.org/650180/diff/12027/15006
File chrome/browser/geolocation/geolocation_permission_context.cc (right):

http://codereview.chromium.org/650180/diff/12027/15006#newcode101
chrome/browser/geolocation/geolocation_permission_context.cc:101:
RequestPermissionFromUI(
On 2010/03/10 15:33:25, bulach wrote:
> On 2010/03/09 21:56:24, Peter Kasting wrote:
> > Nit: In cases like this, you should fit as many args on the first line as
> > possible, then align subsequent lines with the first arg if possible.
> 
> got it, I think I finally see my confusion here, please correct me if I'm
wrong:
> + declaration: either all in one line, or break right after parens
> + call site: as many args as it fits on the first line
> 
> is this correct? fixed the other places with this in mind.

I do: "Declaration: All in one line if possible; else first arg on same line,
other args aligned one per line if possible; else break after paren, all args
aligned, one per line, 4-space indented."  Other people on the team have
declarations where they have multiple args on each line on multiple lines, which
I don't think is preferred style, but we've apparently decided is also OK to do.

Call sites I try to fit multiple args on each line, every line aligned with the
first arg if possible, but if this isn't possible or takes too many lines I use
various other kinds of indents.  We're not too picky about these normally, even
with nits, I think I was just spurred by one of Brett's comments.

http://codereview.chromium.org/650180/diff/12027/15007
File chrome/browser/geolocation/geolocation_permission_context.h (right):

http://codereview.chromium.org/650180/diff/12027/15007#newcode1
chrome/browser/geolocation/geolocation_permission_context.h:1: // Copyright (c)
2010 The Chromium Authors. All rights reserved.
On 2010/03/10 15:33:25, bulach wrote:
> On 2010/03/09 21:56:24, Peter Kasting wrote:
> > I assume that if we go with my simplified UI, this entire class can
disappear?
> 
> > Because this is crazy complex.
> 
> I don't think so: something would still need to check the persisted
> hostcontentsettingsmap, decide whether or not to put up a confirmation
infobar,
> notify back the geolocation service, etc..
> (unless of course we go for an entire re-design and get rid of even the
> confirmation info bar, but I don't think this is possible..)

I changed my UI proposal on the thread.  Let's assume we're keeping this.  I
would make sure you run this particular class and the semantics of what it
touches past darin and eroman; they'll find any subtle problems with it, which
I'm not qualified to detect.

Powered by Google App Engine
This is Rietveld 408576698