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

Issue 3561008: Implement the frame id required for the web navigation api. (Closed)

Created:
10 years, 2 months ago by jochen (gone - plz use gerrit)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org, Erik does not do reviews, Paweł Hajdan Jr., Aaron Boodman, pam+watch_chromium.org, brettw-cc_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Implement the frame id required for the web navigation api. BUG=50943 TEST=*.WebNavigationEvents Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61503

Patch Set 1 #

Total comments: 36

Patch Set 2 : updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -61 lines) Patch
M chrome/browser/extensions/extension_webnavigation_api.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_webnavigation_api.cc View 1 4 chunks +21 lines, -12 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.cc View 1 4 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host_delegate.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/provisional_load_details.h View 3 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/tab_contents/provisional_load_details.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 1 4 chunks +12 lines, -5 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/common/render_messages_params.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/render_messages_params.cc View 1 4 chunks +5 lines, -0 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 3 chunks +4 lines, -3 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/iframe/d.html View 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/iframe/e.html View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/iframe/f.html View 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/iframe/g.html View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/iframeFail/a.html View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/iframeFail/b.html View 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/iframeFail/d.html View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/webnavigation/navigation/test.html View 1 5 chunks +185 lines, -28 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
jochen (gone - plz use gerrit)
please review.
10 years, 2 months ago (2010-10-01 12:33:13 UTC) #1
jochen (gone - plz use gerrit)
+darin for render view parts
10 years, 2 months ago (2010-10-01 12:33:47 UTC) #2
darin (slow to review)
http://codereview.chromium.org/3561008/diff/1/15 File chrome/renderer/render_view.cc (right): http://codereview.chromium.org/3561008/diff/1/15#newcode2907 chrome/renderer/render_view.cc:2907: routing_id_, is_top_most, ds->request().url(), frame->identifier())); i think it would be ...
10 years, 2 months ago (2010-10-01 19:31:37 UTC) #3
Matt Perry
Yuzhu, could you take a look at my comment here: http://codereview.chromium.org/3561008/diff/1/23#newcode324 I can't tell from ...
10 years, 2 months ago (2010-10-01 19:51:46 UTC) #4
jochen (gone - plz use gerrit)
http://codereview.chromium.org/3561008/diff/1/2 File DEPS (right): http://codereview.chromium.org/3561008/diff/1/2#newcode7 DEPS:7: "webkit_revision": "68871", On 2010/10/01 19:51:46, Matt Perry wrote: > ...
10 years, 2 months ago (2010-10-01 22:04:36 UTC) #5
Matt Perry
LGTM with my initial comments addressed (GetFrameID, navigation_state_map, comment on ProvisionalLoadDetails) http://codereview.chromium.org/3561008/diff/1/23 File chrome/test/data/extensions/api_test/webnavigation/navigation/test.html (right): ...
10 years, 2 months ago (2010-10-01 22:15:49 UTC) #6
yzshen
http://codereview.chromium.org/3561008/diff/1/3 File chrome/browser/extensions/extension_webnavigation_api.cc (left): http://codereview.chromium.org/3561008/diff/1/3#oldcode82 chrome/browser/extensions/extension_webnavigation_api.cc:82: (base::Time::Now() - base::Time::UnixEpoch()).InMilliseconds())); Sorry I didn't catch this in ...
10 years, 2 months ago (2010-10-01 22:36:15 UTC) #7
jochen (gone - plz use gerrit)
http://codereview.chromium.org/3561008/diff/1/3 File chrome/browser/extensions/extension_webnavigation_api.cc (left): http://codereview.chromium.org/3561008/diff/1/3#oldcode82 chrome/browser/extensions/extension_webnavigation_api.cc:82: (base::Time::Now() - base::Time::UnixEpoch()).InMilliseconds())); On 2010/10/01 22:36:16, yzshen wrote: > ...
10 years, 2 months ago (2010-10-05 11:59:14 UTC) #8
yzshen
10 years, 2 months ago (2010-10-05 17:04:29 UTC) #9
On 2010/10/05 11:59:14, jochen wrote:
> http://codereview.chromium.org/3561008/diff/1/3
> File chrome/browser/extensions/extension_webnavigation_api.cc (left):
> 
> http://codereview.chromium.org/3561008/diff/1/3#oldcode82
> chrome/browser/extensions/extension_webnavigation_api.cc:82:
(base::Time::Now()
> - base::Time::UnixEpoch()).InMilliseconds()));
> On 2010/10/01 22:36:16, yzshen wrote:
> > Sorry I didn't catch this in previous reviews. But I think this is not
> > consistent with timestamp used in other APIs. For example, in
> > extension_history_api.cc, GetVisitInfoDictionary() sets timestamp using
> > value->SetReal(keys::kVisitTime, MilliSecondsFromTime(row.visit_time));
> > 
> 
> Done.
> 
> http://codereview.chromium.org/3561008/diff/1/3
> File chrome/browser/extensions/extension_webnavigation_api.cc (right):
> 
> http://codereview.chromium.org/3561008/diff/1/3#newcode26
> chrome/browser/extensions/extension_webnavigation_api.cc:26: // Returns 0 if
the
> navigation is happen in the main frame, or the frame id
> On 2010/10/01 22:36:16, yzshen wrote:
> > 1) is happen -> happens/is happening
> > 2) id -> ID
> 
> Done.
> 
> http://codereview.chromium.org/3561008/diff/1/3#newcode27
> chrome/browser/extensions/extension_webnavigation_api.cc:27: // modulo 32 bits
> otherwise (frame ids start with 0, so we add 1)
> On 2010/10/01 22:36:16, yzshen wrote:
> > 1) ids -> IDs
> > 2) Please add a period at the end of the sentence.
> > 3) I think frame IDs start with 1, according to your code in
> > trunk/WebKit/chromium/src/WebFrameImpl.cpp
> 
> Done.
> 
> http://codereview.chromium.org/3561008/diff/1/3#newcode28
> chrome/browser/extensions/extension_webnavigation_api.cc:28: int
> getFrameId(ProvisionalLoadDetails* details) {
> On 2010/10/01 19:51:46, Matt Perry wrote:
> > style: GetFrameID
> 
> Done.
> 
> http://codereview.chromium.org/3561008/diff/1/4
> File chrome/browser/extensions/extension_webnavigation_api.h (right):
> 
> http://codereview.chromium.org/3561008/diff/1/4#newcode40
> chrome/browser/extensions/extension_webnavigation_api.h:40: } NavigationState;
> On 2010/10/01 22:36:16, yzshen wrote:
> > 1) Please add comments for the navigation states.
> > 2) I think there are other navigation states, right? For example, the frame
is
> > not navigating, but without any error.
> Removed the this block
> 
> http://codereview.chromium.org/3561008/diff/1/4#newcode76
> chrome/browser/extensions/extension_webnavigation_api.h:76: NavigationStateMap
> navigation_state_;
> On 2010/10/01 22:36:16, yzshen wrote:
> > 1) If this map won't be used, please remove it;
> > 2) Otherwise, there is a problem: webNavigation notifications are sent for
> > frames instead of tabs. Tracking the navigating state of tabs is not
> sufficient.
> > 
> > Consider the following case:
> > [ mainframe: navigating [subframe_1: error] [subframe_2: done]]
> > 
> > 
> 
> removed this block
> 
> http://codereview.chromium.org/3561008/diff/1/10
> File chrome/browser/tab_contents/tab_contents.cc (right):
> 
> http://codereview.chromium.org/3561008/diff/1/10#newcode2498
> chrome/browser/tab_contents/tab_contents.cc:2498: did_navigate ?
> details.is_main_frame : false, details.is_in_page,
> On 2010/10/01 19:51:46, Matt Perry wrote:
> > I don't follow this logic. Maybe add a comment?
> 
> Done.
> 
> http://codereview.chromium.org/3561008/diff/1/14
> File chrome/common/render_messages_params.h (right):
> 
> http://codereview.chromium.org/3561008/diff/1/14#newcode208
> chrome/common/render_messages_params.h:208: // The frame_id for this
navigation.
> The frame_id uniquely identifies the
> On 2010/10/01 22:36:16, yzshen wrote:
> > frame_id -> frame ID ?
> 
> Done.
> 
> http://codereview.chromium.org/3561008/diff/1/15
> File chrome/renderer/render_view.cc (right):
> 
> http://codereview.chromium.org/3561008/diff/1/15#newcode2907
> chrome/renderer/render_view.cc:2907: routing_id_, is_top_most,
> ds->request().url(), frame->identifier()));
> On 2010/10/01 19:31:37, darin wrote:
> > i think it would be cleaner to always pass the frame identifier first (or
just
> > after the routing_id).
> > 
> > routing_id specifies the tab, frame_id specifies the frame within the tab,
> > is_top_most describes the frame, url is contained within the frame.  there
is
> > somewhat of a progression there.
> 
> Done.
> 
> http://codereview.chromium.org/3561008/diff/1/15#newcode2946
> chrome/renderer/render_view.cc:2946: show_repost_interstitial,
> frame->identifier()));
> On 2010/10/01 19:31:37, darin wrote:
> > ditto
> 
> Done.
> 
> http://codereview.chromium.org/3561008/diff/1/23
> File chrome/test/data/extensions/api_test/webnavigation/navigation/test.html
> (right):
> 
> http://codereview.chromium.org/3561008/diff/1/23#newcode5
> chrome/test/data/extensions/api_test/webnavigation/navigation/test.html:5: var
> frameIds
> On 2010/10/01 22:36:16, yzshen wrote:
> > Please add a ";".
> 
> Done.

LGTM

Thanks, Jochen!

Powered by Google App Engine
This is Rietveld 408576698