Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(3)

Issue 2890523003: WebUI: Add helper FireWebUIListener method on WebUIMessageHandler. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 month, 1 week ago by dpapad
Modified:
1 month, 1 week ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

WebUI: Add helper FireWebUIListener method on WebUIMessageHandler. This will eliminate repetition of "cr.webUIListenerCallback" string literal as follows: Before: CallJavascriptFunction("cr.webUIListenerCallback", base::Value("some-event-name"), *arg1, *arg2); After: FireWebUIListener("some-event-name", *arg1, *arg2); BUG=None Review-Url: https://codereview.chromium.org/2890523003 Cr-Commit-Position: refs/heads/master@{#473260} Committed: https://chromium.googlesource.com/chromium/src/+/9d8cb77dbeb6a4f437ff50b6d0c3f8f40672a0a9

Patch Set 1 #

Patch Set 2 : Nit #

Patch Set 3 : Add example conversion. #

Total comments: 2

Patch Set 4 : Rename #

Total comments: 5

Patch Set 5 : Address comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -12 lines) Patch
M chrome/browser/ui/webui/settings/search_engines_handler.cc View 1 2 3 4 2 chunks +7 lines, -11 lines 0 comments Download
M content/public/browser/web_ui_message_handler.h View 1 2 3 3 chunks +11 lines, -1 line 0 comments Download
Trybot results:  mac_chromium_rel_ng   linux_chromium_chromeos_ozone_rel_ng   mac_chromium_compile_dbg_ng   win_clang   win_chromium_rel_ng   win_chromium_compile_dbg_ng   mac_chromium_compile_dbg_ng   ios-simulator-xcode-clang   ios-simulator   ios-device-xcode-clang   ios-device   linux_chromium_tsan_rel_ng   linux_chromium_compile_dbg_ng   linux_chromium_chromeos_rel_ng   chromeos_daisy_chromium_compile_only_ng   linux_chromium_asan_rel_ng   chromeos_amd64-generic_chromium_compile_only_ng   cast_shell_linux   linux_android_rel_ng   cast_shell_android   android_n5x_swarming_rel   android_cronet   android_compile_dbg   android_clang_dbg_recipe   android_arm64_dbg_recipe   win_chromium_x64_rel_ng   chromium_presubmit   win_chromium_x64_rel_ng   win_chromium_x64_rel_ng   linux_chromium_rel_ng   win_chromium_x64_rel_ng   linux_chromium_rel_ng   chromium_presubmit   mac_chromium_rel_ng   linux_chromium_chromeos_ozone_rel_ng   win_clang   win_chromium_rel_ng   win_chromium_x64_rel_ng   mac_chromium_rel_ng   mac_chromium_compile_dbg_ng   win_chromium_compile_dbg_ng   ios-simulator   ios-simulator-xcode-clang   ios-device-xcode-clang   linux_chromium_tsan_rel_ng   ios-device   linux_chromium_rel_ng   linux_chromium_compile_dbg_ng   linux_chromium_chromeos_rel_ng   linux_chromium_chromeos_ozone_rel_ng   chromium_presubmit   linux_chromium_asan_rel_ng   chromeos_daisy_chromium_compile_only_ng   chromeos_amd64-generic_chromium_compile_only_ng   cast_shell_linux   linux_android_rel_ng   cast_shell_android   android_n5x_swarming_rel   android_cronet   android_clang_dbg_recipe   android_compile_dbg   android_arm64_dbg_recipe 
Commit queue not available (can’t edit this change).

Messages

Total messages: 41 (22 generated)
dpapad
I only converted one usage in this CL as an example, see [1] for a ...
1 month, 1 week ago (2017-05-16 21:01:17 UTC) #14
Dan Beam (no longer on Chrome)
https://codereview.chromium.org/2890523003/diff/40001/chrome/browser/ui/webui/settings/search_engines_handler.cc File chrome/browser/ui/webui/settings/search_engines_handler.cc (right): https://codereview.chromium.org/2890523003/diff/40001/chrome/browser/ui/webui/settings/search_engines_handler.cc#newcode199 chrome/browser/ui/webui/settings/search_engines_handler.cc:199: FireJavascriptEvent("search-engines-changed", *GetSearchEnginesList()); what about ListenerCallback("search-engines-changed", *GetSearchEnginesList()); ?
1 month, 1 week ago (2017-05-16 22:33:38 UTC) #15
Dan Beam (no longer on Chrome)
otherwise I think this is a grand idea!
1 month, 1 week ago (2017-05-16 22:34:02 UTC) #16
dpapad
https://codereview.chromium.org/2890523003/diff/40001/chrome/browser/ui/webui/settings/search_engines_handler.cc File chrome/browser/ui/webui/settings/search_engines_handler.cc (right): https://codereview.chromium.org/2890523003/diff/40001/chrome/browser/ui/webui/settings/search_engines_handler.cc#newcode199 chrome/browser/ui/webui/settings/search_engines_handler.cc:199: FireJavascriptEvent("search-engines-changed", *GetSearchEnginesList()); On 2017/05/16 at 22:33:38, Dan Beam wrote: ...
1 month, 1 week ago (2017-05-16 22:42:14 UTC) #17
Dan Beam (no longer on Chrome)
On 2017/05/16 22:42:14, dpapad wrote: > https://codereview.chromium.org/2890523003/diff/40001/chrome/browser/ui/webui/settings/search_engines_handler.cc > File chrome/browser/ui/webui/settings/search_engines_handler.cc (right): > > https://codereview.chromium.org/2890523003/diff/40001/chrome/browser/ui/webui/settings/search_engines_handler.cc#newcode199 > ...
1 month, 1 week ago (2017-05-16 23:24:22 UTC) #18
dpapad
> FireWebUIListener sgtm Done.
1 month, 1 week ago (2017-05-16 23:42:58 UTC) #20
dpapad
On 2017/05/16 at 23:42:58, dpapad wrote: > > FireWebUIListener sgtm > > Done. FYI, follow ...
1 month, 1 week ago (2017-05-17 01:00:31 UTC) #21
dpapad
On 2017/05/17 at 01:00:31, dpapad wrote: > On 2017/05/16 at 23:42:58, dpapad wrote: > > ...
1 month, 1 week ago (2017-05-18 00:07:13 UTC) #22
Dan Beam (no longer on Chrome)
https://codereview.chromium.org/2890523003/diff/60001/chrome/browser/ui/webui/settings/search_engines_handler.cc File chrome/browser/ui/webui/settings/search_engines_handler.cc (right): https://codereview.chromium.org/2890523003/diff/60001/chrome/browser/ui/webui/settings/search_engines_handler.cc#newcode519 chrome/browser/ui/webui/settings/search_engines_handler.cc:519: } no curlies https://codereview.chromium.org/2890523003/diff/60001/content/public/browser/web_ui_message_handler.h File content/public/browser/web_ui_message_handler.h (right): https://codereview.chromium.org/2890523003/diff/60001/content/public/browser/web_ui_message_handler.h#newcode97 content/public/browser/web_ui_message_handler.h:97: ...
1 month, 1 week ago (2017-05-18 00:08:44 UTC) #23
dpapad
https://codereview.chromium.org/2890523003/diff/60001/chrome/browser/ui/webui/settings/search_engines_handler.cc File chrome/browser/ui/webui/settings/search_engines_handler.cc (right): https://codereview.chromium.org/2890523003/diff/60001/chrome/browser/ui/webui/settings/search_engines_handler.cc#newcode519 chrome/browser/ui/webui/settings/search_engines_handler.cc:519: } On 2017/05/18 at 00:08:44, Dan Beam wrote: > ...
1 month, 1 week ago (2017-05-18 00:41:32 UTC) #24
Dan Beam (no longer on Chrome)
https://codereview.chromium.org/2890523003/diff/60001/content/public/browser/web_ui_message_handler.h File content/public/browser/web_ui_message_handler.h (right): https://codereview.chromium.org/2890523003/diff/60001/content/public/browser/web_ui_message_handler.h#newcode97 content/public/browser/web_ui_message_handler.h:97: void FireWebUIListener(const std::string& event_name, On 2017/05/18 00:41:32, dpapad wrote: ...
1 month, 1 week ago (2017-05-18 03:00:53 UTC) #25
sky OOO
I'm not an owner here. sky->jam (content change)
1 month, 1 week ago (2017-05-18 16:41:28 UTC) #27
jam
lgtm
1 month, 1 week ago (2017-05-18 16:56:23 UTC) #28
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/2890523003/80001
1 month, 1 week ago (2017-05-18 17:24:41 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/459070)
1 month, 1 week ago (2017-05-18 18:10:18 UTC) #32
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/2890523003/80001
1 month, 1 week ago (2017-05-18 19:58:38 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/431182)
1 month, 1 week ago (2017-05-19 01:41:46 UTC) #36
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/2890523003/80001
1 month, 1 week ago (2017-05-19 16:59:02 UTC) #38
commit-bot: I haz the power
1 month, 1 week ago (2017-05-19 18:52:39 UTC) #41
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/9d8cb77dbeb6a4f437ff50b6d0c3...
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 23e94e589