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

Issue 303503008: Convert geolocation code to use RenderFrame instead of RenderView. (Closed)

Created:
6 years, 6 months ago by jam
Modified:
6 years, 6 months ago
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, Michael van Ouwerkerk
Visibility:
Public.

Description

Convert geolocation code to use RenderFrame instead of RenderView. BUG=304341 R=bulach@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274339

Patch Set 1 : #

Total comments: 4

Patch Set 2 : review comments #

Patch Set 3 : sync #

Patch Set 4 : upload to try separately #

Patch Set 5 : sync #

Patch Set 6 : sync #

Patch Set 7 : fix interactive ui test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -57 lines) Patch
M content/browser/geolocation/geolocation_dispatcher_host.h View 1 2 3 4 5 3 chunks +15 lines, -7 lines 0 comments Download
M content/browser/geolocation/geolocation_dispatcher_host.cc View 1 2 3 4 5 9 chunks +55 lines, -31 lines 0 comments Download
M content/renderer/geolocation_dispatcher.h View 1 2 3 4 5 3 chunks +6 lines, -7 lines 0 comments Download
M content/renderer/geolocation_dispatcher.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 3 chunks +5 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 3 chunks +9 lines, -8 lines 0 comments Download
M ui/views/controls/webview/webview_interactive_uitest.cc View 1 2 3 4 5 6 3 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
jam
I was originally planning on committing this after the Blink side, but https://codereview.chromium.org/256843004/ got reverted ...
6 years, 6 months ago (2014-05-30 08:16:32 UTC) #1
bulach
lgtm, but I wanted to highlight a potential issue with main_render_frame_.. I'm not too familiar ...
6 years, 6 months ago (2014-05-30 15:03:12 UTC) #2
jam
6 years, 6 months ago (2014-05-30 16:36:54 UTC) #3
https://codereview.chromium.org/303503008/diff/20001/content/browser/geolocat...
File content/browser/geolocation/geolocation_dispatcher_host.cc (right):

https://codereview.chromium.org/303503008/diff/20001/content/browser/geolocat...
content/browser/geolocation/geolocation_dispatcher_host.cc:206: if
(!updating_frames_.empty() && !paused_) {
On 2014/05/30 15:03:12, bulach wrote:
> nit: while at it, it may be better to invert with an early return:
> 
> if (updating_frames_.empty() || paused_) {
>   geolocation_subscription_.reset();
>   return;
> }
> // Subscribe for location updates.
> bool high_accuracy = false;
> ...

Done.

https://codereview.chromium.org/303503008/diff/20001/content/renderer/render_...
File content/renderer/render_view_impl.cc (right):

https://codereview.chromium.org/303503008/diff/20001/content/renderer/render_...
content/renderer/render_view_impl.cc:2320: return main_render_frame_.get();
On 2014/05/30 15:03:12, bulach wrote:
> just checking....
> this would've returned NULL during initialization.
> now that main_render_frame_ is being set earlier, it'll return a non-NULL
> pointer.
> I don't know if the previous implementation was intentional (it looks so,
since
> main_render_frame_->Initialize() is called much later on), but it seems it'd
be
> safer to change this semantic on its own patch rather than here? wdyt?
> 
> I suppose the geolocation_dispatcher_ initialization could then CHECK to
ensure
> the main_render_frame_ isn't NULL.

My hunch is it's not intentional; so far I haven't seen any breakages in my
testing, but a full try run will make me more confident.

Regarding separating it out, since this cl is not too big, and that change is
only done because of this I prefer to not do the extra work of landing them
separately.

Powered by Google App Engine
This is Rietveld 408576698