Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp |
| diff --git a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp |
| index 6e4bba14596b7147ffc6f9577a0694a049f2814a..306231a7fdb4068a1cbe3cfc5f2bd5a79e7f6994 100644 |
| --- a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp |
| +++ b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp |
| @@ -9,6 +9,7 @@ |
| #include "core/dom/ExceptionCode.h" |
| #include "core/frame/LocalFrame.h" |
| #include "core/frame/Navigator.h" |
| +#include "core/frame/UseCounter.h" |
| #include "modules/webshare/ShareData.h" |
| #include "platform/mojo/MojoHelper.h" |
| #include "public/platform/InterfaceProvider.h" |
| @@ -81,9 +82,11 @@ const char* NavigatorShare::supplementName() |
| ScriptPromise NavigatorShare::share(ScriptState* scriptState, const ShareData& shareData) |
| { |
| + Document* doc = toDocument(scriptState->getExecutionContext()); |
| + DCHECK(doc); |
| + UseCounter::count(doc, UseCounter::WebShareShare); |
|
esprehn
2016/08/10 17:58:58
You're actually calling the ExecutionContext versi
Matt Giuca
2016/08/11 03:33:17
D'oh. That's pretty confusing (I was deliberately
|
| + |
| if (!m_service) { |
| - Document* doc = toDocument(scriptState->getExecutionContext()); |
| - DCHECK(doc); |
| LocalFrame* frame = doc->frame(); |
| DCHECK(frame); |
| frame->interfaceProvider()->getInterface(mojo::GetProxy(&m_service)); |