| Index: third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
|
| diff --git a/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp b/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
|
| index 9ca5c36caaf6505174236f4d07b844b2b54b9bbc..0a560cf63bccb907c90ba4708aa069737906d161 100644
|
| --- a/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
|
| +++ b/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp
|
| @@ -19,7 +19,6 @@
|
|
|
| #include "modules/vibration/NavigatorVibration.h"
|
|
|
| -#include "core/dom/Document.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/frame/Navigator.h"
|
| #include "core/frame/UseCounter.h"
|
| @@ -31,7 +30,7 @@
|
| namespace blink {
|
|
|
| NavigatorVibration::NavigatorVibration(Navigator& navigator)
|
| - : ContextLifecycleObserver(navigator.frame()->document())
|
| + : DOMWindowProperty(navigator.frame())
|
| {
|
| }
|
|
|
| @@ -81,7 +80,7 @@
|
| if (!frame->page()->isPageVisible())
|
| return false;
|
|
|
| - return NavigatorVibration::from(navigator).controller(*frame)->vibrate(pattern);
|
| + return NavigatorVibration::from(navigator).controller()->vibrate(pattern);
|
| }
|
|
|
| // static
|
| @@ -113,15 +112,15 @@
|
| NavigatorVibrateHistogram.count(type);
|
| }
|
|
|
| -VibrationController* NavigatorVibration::controller(const LocalFrame& frame)
|
| +VibrationController* NavigatorVibration::controller()
|
| {
|
| - if (!m_controller)
|
| - m_controller = new VibrationController(*frame.document());
|
| + if (!m_controller && frame())
|
| + m_controller = new VibrationController(*frame()->document());
|
|
|
| return m_controller.get();
|
| }
|
|
|
| -void NavigatorVibration::contextDestroyed()
|
| +void NavigatorVibration::willDetachGlobalObjectFromFrame()
|
| {
|
| if (m_controller) {
|
| m_controller->cancel();
|
| @@ -133,7 +132,7 @@
|
| {
|
| visitor->trace(m_controller);
|
| Supplement<Navigator>::trace(visitor);
|
| - ContextLifecycleObserver::trace(visitor);
|
| + DOMWindowProperty::trace(visitor);
|
| }
|
|
|
| } // namespace blink
|
|
|