|
|
Created:
4 years, 3 months ago by Ken Rockot(use gerrit already) Modified:
4 years, 3 months ago CC:
Aaron Boodman, abarth-chromium, cbentzel+watch_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionConvert some NetError[Tab]Helper messages to mojom
Converts ChromeViewHostMsg_RunNetworkDiagnostics and
ChromeViewMsg_SetCanShowNetworkDiagnosticsDialg to mojom without
impacting message ordering.
The browser-side interface is exposed via a
WebContentsFrameBindingSet<T>.
The renderer-side (client) interface is exposed via
RenderFrameImpl's AssociatedInterfaceRegistry.
This CL serves as a simple example of converting routed IPC
messages which are handled by WebContentsObservers or other
WebContents-bound things.
BUG=612500
Committed: https://crrev.com/e1807f0bc6e60da26c609da2e87aaaae4b03c7b2
Cr-Commit-Position: refs/heads/master@{#419259}
Patch Set 1 #
Total comments: 4
Patch Set 2 : . #Patch Set 3 : . #
Total comments: 8
Patch Set 4 : rebase #Patch Set 5 : . #Patch Set 6 : rebase #
Total comments: 4
Patch Set 7 : rebase #Patch Set 8 : rebase #
Depends on Patchset: Messages
Total messages: 70 (54 generated)
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Convert some NetError[Tab]Helper messages to mojom Uses our shiny new WebContents associated interface support to convert ChromeViewHostMsg_RunNetworkDiagnostics and ChromeViewMsg_SetCanShowNetworkDiagnosticsDialg to mojom without impacting message ordering. BUG=612500 ========== to ========== Convert some NetError[Tab]Helper messages to mojom Uses our shiny new WebContents associated interface support to convert ChromeViewHostMsg_RunNetworkDiagnostics and ChromeViewMsg_SetCanShowNetworkDiagnosticsDialg to mojom without impacting message ordering. Part a series of CLs to enable and demonstrate WebContents associated interfaces: 1. https://codereview.chromium.org/2301123004 2. https://codereview.chromium.org/2309513002 3. https://codereview.chromium.org/2310563002 4. This CL BUG=612500 ==========
rockot@chromium.org changed reviewers: + jam@chromium.org, sammc@chromium.org, tibell@chromium.org
Here's what I came up with for helping WebContentsObservers do stuff. I started out by modifying WebContentsObserver itself, but eventually it became clear that this was not only unnecessary but also limiting. What do you guys think?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
https://codereview.chromium.org/2310583002/diff/1/chrome/browser/net/net_erro... File chrome/browser/net/net_error_tab_helper.cc (right): https://codereview.chromium.org/2310583002/diff/1/chrome/browser/net/net_erro... chrome/browser/net/net_error_tab_helper.cc:189: case 0: // MSVC complains if we have a switch with only a default caluse. Typo: caluse https://codereview.chromium.org/2310583002/diff/1/chrome/browser/net/net_erro... chrome/browser/net/net_error_tab_helper.cc:200: interfaces_(content::WebContentsInterfaceRegistry::Create(contents)), Shouldn't there just be one WebContentsInterfaceRegistry, belonging to the WebContents?
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Updated CL #3 with some changes and rebased here https://codereview.chromium.org/2310583002/diff/1/chrome/browser/net/net_erro... File chrome/browser/net/net_error_tab_helper.cc (right): https://codereview.chromium.org/2310583002/diff/1/chrome/browser/net/net_erro... chrome/browser/net/net_error_tab_helper.cc:189: case 0: // MSVC complains if we have a switch with only a default caluse. On 2016/09/05 at 00:47:33, tibell wrote: > Typo: caluse Done https://codereview.chromium.org/2310583002/diff/1/chrome/browser/net/net_erro... chrome/browser/net/net_error_tab_helper.cc:200: interfaces_(content::WebContentsInterfaceRegistry::Create(contents)), On 2016/09/05 at 00:47:33, tibell wrote: > Shouldn't there just be one WebContentsInterfaceRegistry, belonging to the WebContents? You're right, because (I'm pretty sure) we don't want to end up doubling the number of WebContentsObservers in existence. I've moved WebContentsInterfaceRegistry so an impl is composed directly into WebContentsImpl. However, I've also now added WebContentsFrameInterfaceBinding<T> which uses its own scope to manage the lifetime of a registered interface on the WebContents's registry. WebContents lifetime issues are subtle especially with respect to observers: Many but not all WebContentsObservers are UserData and thus destroyed during WebContentsImpl destruction, but after WebContentsImpl's destructor has run. Rather than expect everyone do get this right, WCFIB does the dirty work for you without needing to be a WebContentsObserver itself. WDYT?
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
https://codereview.chromium.org/2310583002/diff/40001/chrome/browser/net/net_... File chrome/browser/net/net_error_tab_helper.cc (right): https://codereview.chromium.org/2310583002/diff/40001/chrome/browser/net/net_... chrome/browser/net/net_error_tab_helper.cc:103: remote_network_diagnostics_client_.ForFrame(render_frame_host) Do we need to keep connections alive beyond this method? https://codereview.chromium.org/2310583002/diff/40001/chrome/browser/net/net_... chrome/browser/net/net_error_tab_helper.cc:189: case 0: // MSVC complains if we have a switch with only a default clause. Can we move the entire message map into the #if? https://codereview.chromium.org/2310583002/diff/40001/chrome/browser/net/net_... chrome/browser/net/net_error_tab_helper.cc:299: != web_contents()->GetMainFrame()) {} https://codereview.chromium.org/2310583002/diff/40001/chrome/common/network_d... File chrome/common/network_diagnostics.mojom (right): https://codereview.chromium.org/2310583002/diff/40001/chrome/common/network_d... chrome/common/network_diagnostics.mojom:16: SetCanShowNetworkDiagnosticsDialog(bool can_show); I suspect we can delete this IPC now and let the renderer figure it out.
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Convert some NetError[Tab]Helper messages to mojom Uses our shiny new WebContents associated interface support to convert ChromeViewHostMsg_RunNetworkDiagnostics and ChromeViewMsg_SetCanShowNetworkDiagnosticsDialg to mojom without impacting message ordering. Part a series of CLs to enable and demonstrate WebContents associated interfaces: 1. https://codereview.chromium.org/2301123004 2. https://codereview.chromium.org/2309513002 3. https://codereview.chromium.org/2310563002 4. This CL BUG=612500 ========== to ========== Convert some NetError[Tab]Helper messages to mojom Uses our shiny new WebContents associated interface support to convert ChromeViewHostMsg_RunNetworkDiagnostics and ChromeViewMsg_SetCanShowNetworkDiagnosticsDialg to mojom without impacting message ordering. Part a series of CLs to enable and demonstrate WebContents associated interfaces: 1. https://codereview.chromium.org/2309513002 2. https://codereview.chromium.org/2316963005 3. https://codereview.chromium.org/2310563002 4. This CL BUG=612500 ==========
https://codereview.chromium.org/2310583002/diff/40001/chrome/browser/net/net_... File chrome/browser/net/net_error_tab_helper.cc (right): https://codereview.chromium.org/2310583002/diff/40001/chrome/browser/net/net_... chrome/browser/net/net_error_tab_helper.cc:103: remote_network_diagnostics_client_.ForFrame(render_frame_host) On 2016/09/07 at 01:48:47, Sam McNally wrote: > Do we need to keep connections alive beyond this method? Not in this case. I've removed RemoteFrameInterface for now. https://codereview.chromium.org/2310583002/diff/40001/chrome/browser/net/net_... chrome/browser/net/net_error_tab_helper.cc:189: case 0: // MSVC complains if we have a switch with only a default clause. On 2016/09/07 at 01:48:47, Sam McNally wrote: > Can we move the entire message map into the #if? Done https://codereview.chromium.org/2310583002/diff/40001/chrome/browser/net/net_... chrome/browser/net/net_error_tab_helper.cc:299: != web_contents()->GetMainFrame()) On 2016/09/07 at 01:48:47, Sam McNally wrote: > {} Done https://codereview.chromium.org/2310583002/diff/40001/chrome/common/network_d... File chrome/common/network_diagnostics.mojom (right): https://codereview.chromium.org/2310583002/diff/40001/chrome/common/network_d... chrome/common/network_diagnostics.mojom:16: SetCanShowNetworkDiagnosticsDialog(bool can_show); On 2016/09/07 at 01:48:47, Sam McNally wrote: > I suspect we can delete this IPC now and let the renderer figure it out. How? Do you mean add a message to query it from the NetworkDiagnostics interface?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
lgtm
lgtm https://codereview.chromium.org/2310583002/diff/100001/chrome/browser/net/net... File chrome/browser/net/net_error_tab_helper.h (right): https://codereview.chromium.org/2310583002/diff/100001/chrome/browser/net/net... chrome/browser/net/net_error_tab_helper.h:24: class WebContentsInterfaceRegistry; Remove. https://codereview.chromium.org/2310583002/diff/100001/chrome/browser/net/net... File chrome/browser/net/net_error_tab_helper_unittest.cc (right): https://codereview.chromium.org/2310583002/diff/100001/chrome/browser/net/net... chrome/browser/net/net_error_tab_helper_unittest.cc:48: return static_cast<mojom::NetworkDiagnostics*>(this); I don't think the explicit cast is necessary.
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
https://codereview.chromium.org/2310583002/diff/100001/chrome/browser/net/net... File chrome/browser/net/net_error_tab_helper.h (right): https://codereview.chromium.org/2310583002/diff/100001/chrome/browser/net/net... chrome/browser/net/net_error_tab_helper.h:24: class WebContentsInterfaceRegistry; On 2016/09/09 at 06:08:12, Sam McNally wrote: > Remove. Done https://codereview.chromium.org/2310583002/diff/100001/chrome/browser/net/net... File chrome/browser/net/net_error_tab_helper_unittest.cc (right): https://codereview.chromium.org/2310583002/diff/100001/chrome/browser/net/net... chrome/browser/net/net_error_tab_helper_unittest.cc:48: return static_cast<mojom::NetworkDiagnostics*>(this); On 2016/09/09 at 06:08:12, Sam McNally wrote: > I don't think the explicit cast is necessary. Done
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/...)
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #10 (id:180001) has been deleted
Patchset #9 (id:160001) has been deleted
Patchset #8 (id:140001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Convert some NetError[Tab]Helper messages to mojom Uses our shiny new WebContents associated interface support to convert ChromeViewHostMsg_RunNetworkDiagnostics and ChromeViewMsg_SetCanShowNetworkDiagnosticsDialg to mojom without impacting message ordering. Part a series of CLs to enable and demonstrate WebContents associated interfaces: 1. https://codereview.chromium.org/2309513002 2. https://codereview.chromium.org/2316963005 3. https://codereview.chromium.org/2310563002 4. This CL BUG=612500 ========== to ========== Convert some NetError[Tab]Helper messages to mojom Converts ChromeViewHostMsg_RunNetworkDiagnostics and ChromeViewMsg_SetCanShowNetworkDiagnosticsDialg to mojom without impacting message ordering. The browser-side interface is exposed via a WebContentsFrameBindingSet<T>. The renderer-side (client) interface is exposed via RenderFrameImpl's AssociatedInterfaceRegistry. This CL serves as a simple example of converting routed IPC messages which are handled by WebContentsObservers or other WebContents-bound things. BUG=612500 ==========
Patchset #8 (id:200001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
rockot@chromium.org changed reviewers: + tsepez@chromium.org
+tsepez@ for mojom
lgtm
The CQ bit was checked by rockot@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from sammc@chromium.org, tibell@chromium.org Link to the patchset: https://codereview.chromium.org/2310583002/#ps220001 (title: "rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
mojom lgtm
The CQ bit was checked by rockot@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #8 (id:220001)
Message was sent while issue was closed.
Description was changed from ========== Convert some NetError[Tab]Helper messages to mojom Converts ChromeViewHostMsg_RunNetworkDiagnostics and ChromeViewMsg_SetCanShowNetworkDiagnosticsDialg to mojom without impacting message ordering. The browser-side interface is exposed via a WebContentsFrameBindingSet<T>. The renderer-side (client) interface is exposed via RenderFrameImpl's AssociatedInterfaceRegistry. This CL serves as a simple example of converting routed IPC messages which are handled by WebContentsObservers or other WebContents-bound things. BUG=612500 ========== to ========== Convert some NetError[Tab]Helper messages to mojom Converts ChromeViewHostMsg_RunNetworkDiagnostics and ChromeViewMsg_SetCanShowNetworkDiagnosticsDialg to mojom without impacting message ordering. The browser-side interface is exposed via a WebContentsFrameBindingSet<T>. The renderer-side (client) interface is exposed via RenderFrameImpl's AssociatedInterfaceRegistry. This CL serves as a simple example of converting routed IPC messages which are handled by WebContentsObservers or other WebContents-bound things. BUG=612500 Committed: https://crrev.com/e1807f0bc6e60da26c609da2e87aaaae4b03c7b2 Cr-Commit-Position: refs/heads/master@{#419259} ==========
Message was sent while issue was closed.
Patchset 8 (id:??) landed as https://crrev.com/e1807f0bc6e60da26c609da2e87aaaae4b03c7b2 Cr-Commit-Position: refs/heads/master@{#419259} |