Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webusb/USB.cpp |
| diff --git a/third_party/WebKit/Source/modules/webusb/USB.cpp b/third_party/WebKit/Source/modules/webusb/USB.cpp |
| index 73ac25da38b5a6fc8ed63b0bede5732fda92f326..3bd8b8fc2ed3e2bf0c951120c0da1548f8850d94 100644 |
| --- a/third_party/WebKit/Source/modules/webusb/USB.cpp |
| +++ b/third_party/WebKit/Source/modules/webusb/USB.cpp |
| @@ -75,7 +75,7 @@ public: |
| } // namespace |
| USB::USB(LocalFrame& frame) |
| - : LocalFrameLifecycleObserver(&frame) |
| + : ContextLifecycleObserver(frame.document()) |
| , m_client(USBController::from(frame).client()) |
|
haraken
2016/04/06 00:15:12
It looks strange that USB is observing ExecutionCo
Reilly Grant (use Gerrit)
2016/04/06 00:54:34
The Frame is what provides a connection to Mojo se
|
| { |
| if (m_client) |
| @@ -128,7 +128,7 @@ ScriptPromise USB::requestDevice(ScriptState* scriptState, const USBDeviceReques |
| ExecutionContext* USB::getExecutionContext() const |
| { |
| - return frame() ? frame()->document() : nullptr; |
| + return ContextLifecycleObserver::getExecutionContext(); |
| } |
| const AtomicString& USB::interfaceName() const |
| @@ -136,7 +136,7 @@ const AtomicString& USB::interfaceName() const |
| return EventTargetNames::USB; |
| } |
| -void USB::willDetachFrameHost() |
| +void USB::contextDestroyed() |
| { |
| if (m_client) |
| m_client->removeObserver(this); |
| @@ -156,7 +156,7 @@ void USB::onDeviceDisconnected(WebPassOwnPtr<WebUSBDevice> device) |
| DEFINE_TRACE(USB) |
| { |
| RefCountedGarbageCollectedEventTargetWithInlineData<USB>::trace(visitor); |
| - LocalFrameLifecycleObserver::trace(visitor); |
| + ContextLifecycleObserver::trace(visitor); |
| } |
| } // namespace blink |