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

Issue 2811993004: [MD Extensions] Add support for URL navigation (Closed)

Created:
3 years, 8 months ago by Devlin
Modified:
3 years, 3 months ago
Reviewers:
michaelpg
CC:
chromium-reviews, extensions-reviews_chromium.org, michaelpg+watch-md-ui_chromium.org, arv+watch_chromium.org, chromium-apps-reviews_chromium.org, vitalyp+closure_chromium.org, dbeam+watch-closure_chromium.org, jlklein+watch-closure_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[MD Extensions] Add support for URL navigation The chrome://extensions page uses different urls for a few things, primarily to highlight a given extension or to display the extension's options. In the MD version, we have separate pages for these, which makes these more like navigations. Add basic page and history manipulation to the chrome://extensions page. Navigating to a subpage updates the location and pushes a new state to the history stack, so that clicking back will return you to the previous page. Dialogs are contained within a page, and do not push a new history state. Examples: - Navigating from the main view to the details view updates the location, and 'back' would return to the main view. - Opening the options dialog from the details view does not push new state (since otherwise 'back' would just close the dialog). Add tests for the same. BUG=529395 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2811993004 Cr-Commit-Position: refs/heads/master@{#469216} Committed: https://chromium.googlesource.com/chromium/src/+/8904a23861a4ec7ef5f8851a55d68c198c3ce829

Patch Set 1 #

Patch Set 2 : . #

Total comments: 17

Patch Set 3 : Michael's #

Total comments: 12

Patch Set 4 : Michael's #

Total comments: 25

Patch Set 5 : Michael's #

Total comments: 4

Patch Set 6 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+468 lines, -72 lines) Patch
M chrome/browser/browser_resources.grd View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_extensions/compiled_resources2.gyp View 1 2 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_extensions/manager.html View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/resources/md_extensions/manager.js View 1 2 3 4 11 chunks +117 lines, -52 lines 0 comments Download
A chrome/browser/resources/md_extensions/navigation_helper.html View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/browser/resources/md_extensions/navigation_helper.js View 1 2 3 4 1 chunk +114 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_extensions/options_dialog.js View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_extensions/service.js View 1 2 3 4 2 chunks +8 lines, -13 lines 0 comments Download
M chrome/browser/ui/webui/extensions/extensions_ui.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/data/webui/extensions/cr_extensions_browsertest.js View 1 2 3 4 2 chunks +37 lines, -0 lines 0 comments Download
M chrome/test/data/webui/extensions/extension_manager_test.js View 1 chunk +6 lines, -6 lines 0 comments Download
A chrome/test/data/webui/extensions/extension_navigation_helper_test.js View 1 2 3 4 5 1 chunk +160 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (21 generated)
Devlin
Michael, mind taking a look? If you wanna see how this works in person, feel ...
3 years, 8 months ago (2017-04-14 16:04:12 UTC) #6
michaelpg
> Navigating to a subpage updates the location and pushes a new state to > ...
3 years, 8 months ago (2017-04-14 20:23:53 UTC) #9
Devlin
renamed PageState -> NavigationHelper, PageEntry -> PageState per our discussion. https://codereview.chromium.org/2811993004/diff/20001/chrome/browser/resources/md_extensions/manager.js File chrome/browser/resources/md_extensions/manager.js (right): https://codereview.chromium.org/2811993004/diff/20001/chrome/browser/resources/md_extensions/manager.js#newcode127 ...
3 years, 8 months ago (2017-04-17 23:29:25 UTC) #11
michaelpg
This is making a lot more sense to me now. Maybe I was just confused ...
3 years, 8 months ago (2017-04-18 22:03:12 UTC) #12
Devlin
Sorry for the delay in getting this back https://codereview.chromium.org/2811993004/diff/40001/chrome/browser/resources/md_extensions/navigation_helper.js File chrome/browser/resources/md_extensions/navigation_helper.js (right): https://codereview.chromium.org/2811993004/diff/40001/chrome/browser/resources/md_extensions/navigation_helper.js#newcode34 chrome/browser/resources/md_extensions/navigation_helper.js:34: * ...
3 years, 7 months ago (2017-04-27 13:41:26 UTC) #17
michaelpg
Sorry, had a busier time than usual as CrOS gardener last week. Getting to this ...
3 years, 7 months ago (2017-05-01 19:19:59 UTC) #18
michaelpg
I like where this is. I have some suggestions/minor fixes, but it's nicely put together. ...
3 years, 7 months ago (2017-05-01 23:41:26 UTC) #19
Devlin
https://codereview.chromium.org/2811993004/diff/60001/chrome/browser/resources/md_extensions/manager.js File chrome/browser/resources/md_extensions/manager.js (right): https://codereview.chromium.org/2811993004/diff/60001/chrome/browser/resources/md_extensions/manager.js#newcode343 chrome/browser/resources/md_extensions/manager.js:343: assert(newPage.id); On 2017/05/01 23:41:25, michaelpg wrote: > throughout this ...
3 years, 7 months ago (2017-05-02 01:04:07 UTC) #20
michaelpg
nice, couple cleanups then lgtm https://codereview.chromium.org/2811993004/diff/60001/chrome/browser/resources/md_extensions/manager.js File chrome/browser/resources/md_extensions/manager.js (right): https://codereview.chromium.org/2811993004/diff/60001/chrome/browser/resources/md_extensions/manager.js#newcode351 chrome/browser/resources/md_extensions/manager.js:351: var entry; On 2017/05/02 ...
3 years, 7 months ago (2017-05-02 20:58:10 UTC) #21
Devlin
https://codereview.chromium.org/2811993004/diff/80001/chrome/test/data/webui/extensions/extension_navigation_helper_test.js File chrome/test/data/webui/extensions/extension_navigation_helper_test.js (right): https://codereview.chromium.org/2811993004/diff/80001/chrome/test/data/webui/extensions/extension_navigation_helper_test.js#newcode60 chrome/test/data/webui/extensions/extension_navigation_helper_test.js:60: waitForNextPop = getOnPopState(); On 2017/05/02 20:58:10, michaelpg wrote: > ...
3 years, 7 months ago (2017-05-04 00:15:55 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2811993004/100001
3 years, 7 months ago (2017-05-04 00:16:41 UTC) #29
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/8904a23861a4ec7ef5f8851a55d68c198c3ce829
3 years, 7 months ago (2017-05-04 00:25:58 UTC) #33
wOxxOm
3 years, 3 months ago (2017-09-10 19:09:16 UTC) #34
Message was sent while issue was closed.
@rdevlin, will the documented [1] URL chrome://extensions/configureCommands to
invoke the keyboard shortcuts dialog be used when MD-extensions page is enabled
by default?

I'm assuming a different URL is used temporarily because otherwise it would
cause navigation conflicts internally. The thing is, if a different URL goes
into production, the extensions that open this dialog (which is effectively a
buried treasure even on the new MD page) will have to check userAgent for build
number or do other weird things like chrome.webNavigation.getAllFrames which
produces a different number of frames for classic/MD page.

  1: https://developer.chrome.com/extensions/commands

Powered by Google App Engine
This is Rietveld 408576698