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

Issue 1855423002: Make USB a ContextLifecycleObserver. (Closed)

Created:
4 years, 8 months ago by Reilly Grant (use Gerrit)
Modified:
4 years, 8 months ago
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make USB a ContextLifecycleObserver. This patch makes USB a ContextLifecycleObserver. When the context is destroyed it stops listening for device changes. This is the same signal USBDevice listens for to close device connections on navigation. BUG=598855 Committed: https://crrev.com/54ad52b6a815e0aaca6391f7baac2e1064d4acec Cr-Commit-Position: refs/heads/master@{#385365}

Patch Set 1 #

Patch Set 2 : Switch back to ContextLifetimeObservers. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -9 lines) Patch
M third_party/WebKit/Source/modules/webusb/USB.h View 1 3 chunks +4 lines, -4 lines 2 comments Download
M third_party/WebKit/Source/modules/webusb/USB.cpp View 1 4 chunks +4 lines, -4 lines 2 comments Download
M third_party/WebKit/Source/modules/webusb/USBDevice.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webusb/USBDevice.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 27 (6 generated)
Reilly Grant (use Gerrit)
Please take a look.
4 years, 8 months ago (2016-04-04 21:25:11 UTC) #2
haraken
This change makes some sense, but the CL description doesn't make sense. > There objects ...
4 years, 8 months ago (2016-04-05 01:17:41 UTC) #3
Reilly Grant (use Gerrit)
On 2016/04/05 at 01:17:41, haraken wrote: > > not good enough because ContextLifecycleObserver::willDetachFrameHost() > > ...
4 years, 8 months ago (2016-04-05 01:28:25 UTC) #4
Reilly Grant (use Gerrit)
On 2016/04/05 at 01:28:25, Reilly Grant wrote: > On 2016/04/05 at 01:17:41, haraken wrote: > ...
4 years, 8 months ago (2016-04-05 01:31:17 UTC) #5
Reilly Grant (use Gerrit)
I've updated this patch to simply make USB a ContextLifecycleObserver like USBDevice and verified that ...
4 years, 8 months ago (2016-04-05 22:19:17 UTC) #7
Jeffrey Yasskin
Kentaro, could you review this? Without any documentation or tests for LifecycleObserver, I don't know ...
4 years, 8 months ago (2016-04-06 00:01:24 UTC) #9
haraken
>> LocalFrameLifecycleObserver::willDetachFrameHost() must be called when a frame navigates away. >> > I can demonstrate ...
4 years, 8 months ago (2016-04-06 00:15:07 UTC) #10
haraken
https://codereview.chromium.org/1855423002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp File third_party/WebKit/Source/modules/webusb/USB.cpp (right): https://codereview.chromium.org/1855423002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp#newcode79 third_party/WebKit/Source/modules/webusb/USB.cpp:79: , m_client(USBController::from(frame).client()) It looks strange that USB is observing ...
4 years, 8 months ago (2016-04-06 00:15:12 UTC) #11
Reilly Grant (use Gerrit)
On 2016/04/06 at 00:15:07, haraken wrote: > >> LocalFrameLifecycleObserver::willDetachFrameHost() must be called when a frame ...
4 years, 8 months ago (2016-04-06 00:54:27 UTC) #12
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1855423002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp File third_party/WebKit/Source/modules/webusb/USB.cpp (right): https://codereview.chromium.org/1855423002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp#newcode79 third_party/WebKit/Source/modules/webusb/USB.cpp:79: , m_client(USBController::from(frame).client()) On 2016/04/06 at 00:15:12, haraken wrote: > ...
4 years, 8 months ago (2016-04-06 00:54:34 UTC) #13
haraken
On 2016/04/06 00:54:27, Reilly Grant wrote: > On 2016/04/06 at 00:15:07, haraken wrote: > > ...
4 years, 8 months ago (2016-04-06 01:04:51 UTC) #15
dcheng
On 2016/04/06 at 01:04:51, haraken wrote: > On 2016/04/06 00:54:27, Reilly Grant wrote: > > ...
4 years, 8 months ago (2016-04-06 01:14:24 UTC) #16
dcheng
On 2016/04/06 at 01:14:24, dcheng wrote: > On 2016/04/06 at 01:04:51, haraken wrote: > > ...
4 years, 8 months ago (2016-04-06 01:15:09 UTC) #17
haraken
LGTM https://codereview.chromium.org/1855423002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.h File third_party/WebKit/Source/modules/webusb/USB.h (right): https://codereview.chromium.org/1855423002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.h#newcode30 third_party/WebKit/Source/modules/webusb/USB.h:30: static USB* create(LocalFrame& frame) Can you make USB::create ...
4 years, 8 months ago (2016-04-06 01:15:42 UTC) #18
haraken
I'm afraid that many callers are expecting willDetachFrameHost is called on navigation... https://code.google.com/p/chromium/codesearch#search/&q=willdetachframehost&sq=package:chromium&type=cs (Either way, ...
4 years, 8 months ago (2016-04-06 01:18:38 UTC) #19
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1855423002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.h File third_party/WebKit/Source/modules/webusb/USB.h (right): https://codereview.chromium.org/1855423002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.h#newcode30 third_party/WebKit/Source/modules/webusb/USB.h:30: static USB* create(LocalFrame& frame) On 2016/04/06 at 01:15:42, haraken ...
4 years, 8 months ago (2016-04-06 01:21:56 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1855423002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1855423002/20001
4 years, 8 months ago (2016-04-06 01:23:04 UTC) #22
dcheng
On 2016/04/06 at 01:18:38, haraken wrote: > I'm afraid that many callers are expecting willDetachFrameHost ...
4 years, 8 months ago (2016-04-06 01:24:37 UTC) #23
dcheng
On 2016/04/06 at 01:21:56, reillyg wrote: > https://codereview.chromium.org/1855423002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.h > File third_party/WebKit/Source/modules/webusb/USB.h (right): > > https://codereview.chromium.org/1855423002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.h#newcode30 ...
4 years, 8 months ago (2016-04-06 01:27:56 UTC) #24
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-06 01:30:48 UTC) #25
commit-bot: I haz the power
4 years, 8 months ago (2016-04-06 01:31:47 UTC) #27
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/54ad52b6a815e0aaca6391f7baac2e1064d4acec
Cr-Commit-Position: refs/heads/master@{#385365}

Powered by Google App Engine
This is Rietveld 408576698