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

Issue 2074733002: Add public API for handling Javascript alerts and prompt. (Closed)

Created:
4 years, 6 months ago by michaeldo
Modified:
4 years, 5 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add public API for handling Javascript alerts and prompt. DialogPresenter provides an abstract interface for handling JavaScript alerts and the HTTP Authentication prompt. A subclass can be provided through the WebStateDelegate. Proposal Link: https://docs.google.com/document/d/1d3PxHcDGyZlrgEBa58oh-eFFOWUYLOv8kIiuftFjli8/edit BUG=620739 Committed: https://crrev.com/e9e6159b0f99159b11f7d74d32bfeb81d14cbb1f Cr-Commit-Position: refs/heads/master@{#402617}

Patch Set 1 #

Patch Set 2 : Updates per design doc. #

Patch Set 3 : Cleanup. #

Patch Set 4 : Cleanup. #

Patch Set 5 : Cleanup. #

Total comments: 35

Patch Set 6 : Remote auth dialog methods. #

Patch Set 7 : Cleanup. #

Total comments: 24

Patch Set 8 : Cleanup. #

Patch Set 9 : Add unittests. Address missed comments. #

Total comments: 6

Patch Set 10 : Add JavaScriptDialogPresenter implementation. #

Patch Set 11 : Replace BOOL with bool in unittest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+333 lines, -10 lines) Patch
M ios/web/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M ios/web/ios_web.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
A ios/web/public/java_script_dialog_callback.h View 1 2 3 4 5 6 7 1 chunk +20 lines, -0 lines 0 comments Download
A ios/web/public/java_script_dialog_presenter.h View 1 2 3 4 5 6 7 8 1 chunk +35 lines, -0 lines 0 comments Download
A ios/web/public/java_script_dialog_type.h View 1 2 3 4 5 6 7 1 chunk +22 lines, -0 lines 0 comments Download
M ios/web/public/web_state/web_state_delegate.h View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M ios/web/public/web_state/web_state_delegate_bridge.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller.mm View 1 2 3 4 5 6 7 8 9 chunks +55 lines, -6 lines 0 comments Download
M ios/web/web_state/web_state_delegate.mm View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M ios/web/web_state/web_state_delegate_bridge.mm View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -0 lines 0 comments Download
M ios/web/web_state/web_state_delegate_bridge_unittest.mm View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M ios/web/web_state/web_state_delegate_stub.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M ios/web/web_state/web_state_delegate_stub.mm View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -0 lines 0 comments Download
M ios/web/web_state/web_state_impl.h View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -0 lines 0 comments Download
M ios/web/web_state/web_state_impl.mm View 1 2 3 4 5 6 7 8 2 chunks +27 lines, -0 lines 0 comments Download
M ios/web/web_state/web_state_impl_unittest.mm View 1 2 3 4 5 6 7 8 9 10 3 chunks +106 lines, -4 lines 0 comments Download

Messages

Total messages: 25 (10 generated)
michaeldo
4 years, 6 months ago (2016-06-16 15:08:32 UTC) #2
marq (ping after 24h)
4 years, 6 months ago (2016-06-24 14:09:12 UTC) #5
Eugene But (OOO till 7-30)
Sorry I missed something big in design doc. HTTP Authentication does not necessarily require the ...
4 years, 6 months ago (2016-06-24 17:04:53 UTC) #6
michaeldo
https://codereview.chromium.org/2074733002/diff/80001/ios/web/BUILD.gn File ios/web/BUILD.gn (right): https://codereview.chromium.org/2074733002/diff/80001/ios/web/BUILD.gn#newcode110 ios/web/BUILD.gn:110: "public/javascript_message_type.h", On 2016/06/24 17:04:52, Eugene But wrote: > s/message/dialog ...
4 years, 5 months ago (2016-06-27 20:30:10 UTC) #7
Eugene But (OOO till 7-30)
Can you add unit tests for this new code? https://codereview.chromium.org/2074733002/diff/80001/ios/web/public/dialog_presenter.h File ios/web/public/dialog_presenter.h (right): https://codereview.chromium.org/2074733002/diff/80001/ios/web/public/dialog_presenter.h#newcode32 ios/web/public/dialog_presenter.h:32: ...
4 years, 5 months ago (2016-06-27 21:09:37 UTC) #8
michaeldo
https://codereview.chromium.org/2074733002/diff/120001/ios/web/ios_web.gyp File ios/web/ios_web.gyp (right): https://codereview.chromium.org/2074733002/diff/120001/ios/web/ios_web.gyp#newcode144 ios/web/ios_web.gyp:144: 'public/javascript_dialog_callback.h', On 2016/06/27 21:09:37, Eugene But wrote: > NIT: ...
4 years, 5 months ago (2016-06-27 22:25:10 UTC) #9
Eugene But (OOO till 7-30)
Per my previous comment, is it possible to add unit tests? https://codereview.chromium.org/2074733002/diff/80001/ios/web/public/dialog_presenter.h File ios/web/public/dialog_presenter.h (right): ...
4 years, 5 months ago (2016-06-27 22:33:56 UTC) #10
michaeldo
I've updated the existing unittests to cover the new functionality. Please let me know if ...
4 years, 5 months ago (2016-06-28 17:44:47 UTC) #11
Eugene But (OOO till 7-30)
LGTM thanks for tests! https://codereview.chromium.org/2074733002/diff/160001/ios/web/web_state/ui/crw_web_controller.mm File ios/web/web_state/ui/crw_web_controller.mm (right): https://codereview.chromium.org/2074733002/diff/160001/ios/web/web_state/ui/crw_web_controller.mm#newcode3781 ios/web/web_state/ui/crw_web_controller.mm:3781: net::GURLWithNSURL(frame.request.URL), type, message, defaultText, Could ...
4 years, 5 months ago (2016-06-28 18:14:49 UTC) #12
michaeldo
https://codereview.chromium.org/2074733002/diff/160001/ios/web/web_state/ui/crw_web_controller.mm File ios/web/web_state/ui/crw_web_controller.mm (right): https://codereview.chromium.org/2074733002/diff/160001/ios/web/web_state/ui/crw_web_controller.mm#newcode3781 ios/web/web_state/ui/crw_web_controller.mm:3781: net::GURLWithNSURL(frame.request.URL), type, message, defaultText, On 2016/06/28 18:14:48, Eugene But ...
4 years, 5 months ago (2016-06-28 21:58:27 UTC) #13
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/2074733002/180001
4 years, 5 months ago (2016-06-28 22:06:15 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/28303)
4 years, 5 months ago (2016-06-28 22:26:00 UTC) #18
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/2074733002/200001
4 years, 5 months ago (2016-06-28 22:34:14 UTC) #21
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 5 months ago (2016-06-29 00:39:40 UTC) #23
commit-bot: I haz the power
4 years, 5 months ago (2016-06-29 00:42:03 UTC) #25
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/e9e6159b0f99159b11f7d74d32bfeb81d14cbb1f
Cr-Commit-Position: refs/heads/master@{#402617}

Powered by Google App Engine
This is Rietveld 408576698