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

Issue 3307013: Implement the webNavigation.onCommitted event. (Closed)

Created:
10 years, 3 months ago by jochen (gone - plz use gerrit)
Modified:
9 years, 7 months ago
Reviewers:
Matt Perry
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, yzshen
Visibility:
Public.

Description

Implement the webNavigation.onCommitted event. BUG=50943 TEST=ExtensionApiTest.WebNavigationEvents Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=58802

Patch Set 1 #

Patch Set 2 : updates #

Patch Set 3 : updates #

Total comments: 11

Patch Set 4 : updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+326 lines, -4 lines) Patch
A chrome/browser/extensions/extension_webnavigation_api.h View 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_webnavigation_api.cc View 1 chunk +85 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_webnavigation_apitest.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extensions_service.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/navigation_controller.cc View 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/extension_api.json View 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/experimental.webNavigation.html View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/common/page_transition_types.h View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/common/page_transition_types.cc View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/clientRedirect/a.html View 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/clientRedirect/b.html View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/forwardBack/a.html View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/forwardBack/b.html View 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/iframe/a.html View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/iframe/b.html View 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/iframe/c.html View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/manifest.json View 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/simpleLoad/a.html View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webnavigation/navigation/test.html View 1 2 3 1 chunk +117 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
jochen (gone - plz use gerrit)
please review.
10 years, 3 months ago (2010-09-06 17:46:32 UTC) #1
Matt Perry
LGTM after some small fixes. http://codereview.chromium.org/3307013/diff/5001/6001 File chrome/browser/extensions/extension_webnavigation_api.cc (right): http://codereview.chromium.org/3307013/diff/5001/6001#newcode77 chrome/browser/extensions/extension_webnavigation_api.cc:77: void ExtensionWebNavigationEventRouter::DispatchEvent( nit: in ...
10 years, 3 months ago (2010-09-07 22:14:41 UTC) #2
jochen (gone - plz use gerrit)
10 years, 3 months ago (2010-09-08 08:44:50 UTC) #3
http://codereview.chromium.org/3307013/diff/5001/6001
File chrome/browser/extensions/extension_webnavigation_api.cc (right):

http://codereview.chromium.org/3307013/diff/5001/6001#newcode77
chrome/browser/extensions/extension_webnavigation_api.cc:77: void
ExtensionWebNavigationEventRouter::DispatchEvent(
On 2010/09/07 22:14:41, Matt Perry wrote:
> nit: in cases like this where the method doesn't depend on the class at all, I
> prefer to make it a file-level static function.
Given that the other event routers do the same, I'd rather stick with this.

http://codereview.chromium.org/3307013/diff/5001/6010
File chrome/common/page_transition_types.h (right):

http://codereview.chromium.org/3307013/diff/5001/6010#newcode123
chrome/common/page_transition_types.h:123: FORWARD_BACK = 0x01000000,
On 2010/09/07 22:14:41, Matt Perry wrote:
> this belongs before CHAIN_START

Done.

http://codereview.chromium.org/3307013/diff/5001/6020
File chrome/test/data/extensions/api_test/webnavigation/navigation/test.html
(right):

http://codereview.chromium.org/3307013/diff/5001/6020#newcode20
chrome/test/data/extensions/api_test/webnavigation/navigation/test.html:20:
console.log('---onCommitted: ' + details.url);
On 2010/09/07 22:14:41, Matt Perry wrote:
> 2 space indent

Done.

http://codereview.chromium.org/3307013/diff/5001/6020#newcode32
chrome/test/data/extensions/api_test/webnavigation/navigation/test.html:32: var
tabId = tab.id;
On 2010/09/07 22:14:41, Matt Perry wrote:
> 2 space indent, same below.

Done.

http://codereview.chromium.org/3307013/diff/5001/6020#newcode90
chrome/test/data/extensions/api_test/webnavigation/navigation/test.html:90:
chrome.tabs.update(tabId, { url: getURL('forwardBack/b.html') });
On 2010/09/07 22:14:41, Matt Perry wrote:
> I think you want to put this second call in the callback to the first update()
> call, and only then if . Otherwise, it might run before the first is
committed.
> (In fact, I'm not 100% sure doing this will cause it to commit before running
> the second call either. Watch this test for race flakiness).

Done.

Powered by Google App Engine
This is Rietveld 408576698