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

Issue 1929783002: [ios Mojo] Supporting code for define WebUI function. (Closed)

Created:
4 years, 7 months ago by Eugene But (OOO till 7-30)
Modified:
4 years, 7 months ago
Reviewers:
Jackie Quinn, dpapad
CC:
chromium-reviews, oshima+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@mojo_require_js
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[ios Mojo] Supporting code for define WebUI function. iOS WebUI will be rebuilt on top of Mojo. All mojo dependencies in JavaScript are managed via |define| function, which is natively implemented in content// only for WebUI pages. iOS does not use content, so |define| can only be implemented in JavaScript. Require.js open source library implements |define| in almost exactly same way as needed by web//. The only exception is that loading can not happen from network, because WKWebView does not support custom network protocols. This CL implements scripts fetching initiated by require.js library. https://docs.google.com/document/d/1iUJXX_zoY2BbnecpfxjznOeasf29KUzl_9S_LG08Bes/edit#heading=h.yjqp5garsqf9 BUG=567809 Committed: https://crrev.com/174e8ecd336f3582187aeff6deb2bb1a4a9803b9 Cr-Commit-Position: refs/heads/master@{#392212}

Patch Set 1 #

Patch Set 2 : Self review #

Patch Set 3 : Merged with require.js CL #

Total comments: 6

Patch Set 4 : Addressed review comments #

Total comments: 8

Patch Set 5 : Addressed review comments #

Total comments: 5

Patch Set 6 : Actually use Map API #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -42 lines) Patch
M ios/web/BUILD.gn View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M ios/web/ios_web.gyp View 1 2 3 chunks +10 lines, -2 lines 0 comments Download
M ios/web/public/test/test_web_client.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ios/web/public/test/test_web_client.mm View 2 chunks +12 lines, -0 lines 0 comments Download
A ios/web/test/test_url_constants.h View 1 chunk +15 lines, -0 lines 0 comments Download
A + ios/web/test/test_url_constants.cc View 1 chunk +4 lines, -6 lines 0 comments Download
M ios/web/test/web_test.mm View 2 chunks +8 lines, -1 line 0 comments Download
M ios/web/webui/crw_web_ui_manager.mm View 5 chunks +75 lines, -5 lines 0 comments Download
M ios/web/webui/crw_web_ui_manager_unittest.mm View 1 8 chunks +53 lines, -27 lines 0 comments Download
M ios/web/webui/resources/web_ui_bundle.js View 1 chunk +2 lines, -1 line 0 comments Download
A ios/web/webui/resources/web_ui_module_load_notifier.js View 1 2 3 4 5 1 chunk +59 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 20 (6 generated)
Eugene But (OOO till 7-30)
This makes |define| from require.js actually work.
4 years, 7 months ago (2016-04-28 18:45:23 UTC) #3
Jackie Quinn
lgtm
4 years, 7 months ago (2016-04-28 21:50:37 UTC) #4
dpapad
https://codereview.chromium.org/1929783002/diff/40001/ios/web/webui/resources/web_ui_module_load_notifier.js File ios/web/webui/resources/web_ui_module_load_notifier.js (right): https://codereview.chromium.org/1929783002/diff/40001/ios/web/webui/resources/web_ui_module_load_notifier.js#newcode20 ios/web/webui/resources/web_ui_module_load_notifier.js:20: * @return {String} Identifier for the added context, can ...
4 years, 7 months ago (2016-04-28 22:29:20 UTC) #5
Eugene But (OOO till 7-30)
Thanks! https://codereview.chromium.org/1929783002/diff/40001/ios/web/webui/resources/web_ui_module_load_notifier.js File ios/web/webui/resources/web_ui_module_load_notifier.js (right): https://codereview.chromium.org/1929783002/diff/40001/ios/web/webui/resources/web_ui_module_load_notifier.js#newcode20 ios/web/webui/resources/web_ui_module_load_notifier.js:20: * @return {String} Identifier for the added context, ...
4 years, 7 months ago (2016-04-29 00:10:41 UTC) #6
Eugene But (OOO till 7-30)
Demetrios, do you have more comments on this?
4 years, 7 months ago (2016-05-05 15:40:44 UTC) #7
dpapad
LGTM with optional nits. https://codereview.chromium.org/1929783002/diff/60001/ios/web/webui/resources/web_ui_module_load_notifier.js File ios/web/webui/resources/web_ui_module_load_notifier.js (right): https://codereview.chromium.org/1929783002/diff/60001/ios/web/webui/resources/web_ui_module_load_notifier.js#newcode13 ios/web/webui/resources/web_ui_module_load_notifier.js:13: this.pendingContexts_ = {}; Does native ...
4 years, 7 months ago (2016-05-05 17:19:59 UTC) #8
Eugene But (OOO till 7-30)
Thanks! https://codereview.chromium.org/1929783002/diff/60001/ios/web/webui/resources/web_ui_module_load_notifier.js File ios/web/webui/resources/web_ui_module_load_notifier.js (right): https://codereview.chromium.org/1929783002/diff/60001/ios/web/webui/resources/web_ui_module_load_notifier.js#newcode13 ios/web/webui/resources/web_ui_module_load_notifier.js:13: this.pendingContexts_ = {}; On 2016/05/05 17:19:59, dpapad wrote: ...
4 years, 7 months ago (2016-05-05 18:43:49 UTC) #9
dpapad
https://codereview.chromium.org/1929783002/diff/80001/ios/web/webui/resources/web_ui_module_load_notifier.js File ios/web/webui/resources/web_ui_module_load_notifier.js (right): https://codereview.chromium.org/1929783002/diff/80001/ios/web/webui/resources/web_ui_module_load_notifier.js#newcode26 ios/web/webui/resources/web_ui_module_load_notifier.js:26: this.pendingContexts_[key] = context; If you are using Map, this ...
4 years, 7 months ago (2016-05-05 18:48:21 UTC) #10
dpapad
I suggest double checking that Map is supported in IOS, when using it as a ...
4 years, 7 months ago (2016-05-05 18:53:29 UTC) #11
Eugene But (OOO till 7-30)
All done. Thanks! https://codereview.chromium.org/1929783002/diff/80001/ios/web/webui/resources/web_ui_module_load_notifier.js File ios/web/webui/resources/web_ui_module_load_notifier.js (right): https://codereview.chromium.org/1929783002/diff/80001/ios/web/webui/resources/web_ui_module_load_notifier.js#newcode26 ios/web/webui/resources/web_ui_module_load_notifier.js:26: this.pendingContexts_[key] = context; On 2016/05/05 18:48:21, ...
4 years, 7 months ago (2016-05-05 20:46:52 UTC) #12
dpapad
On 2016/05/05 at 20:46:52, eugenebut wrote: > All done. Thanks! > > https://codereview.chromium.org/1929783002/diff/80001/ios/web/webui/resources/web_ui_module_load_notifier.js > File ...
4 years, 7 months ago (2016-05-05 20:51:48 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1929783002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1929783002/100001
4 years, 7 months ago (2016-05-06 23:07:28 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 7 months ago (2016-05-07 00:13:15 UTC) #18
commit-bot: I haz the power
4 years, 7 months ago (2016-05-07 00:15:02 UTC) #20
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/174e8ecd336f3582187aeff6deb2bb1a4a9803b9
Cr-Commit-Position: refs/heads/master@{#392212}

Powered by Google App Engine
This is Rietveld 408576698