| Index: third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
|
| diff --git a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
|
| index d7097b9a0f18dc66eef472f7e884c97ed3cae1eb..bbefd948fc6eee8837c51d4f2f38aa304c359274 100644
|
| --- a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
|
| +++ b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
|
| @@ -10,6 +10,7 @@
|
| #include "core/dom/Document.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/frame/LocalFrame.h"
|
| +#include "core/frame/UseCounter.h"
|
| #include "modules/presentation/PresentationConnection.h"
|
| #include "modules/presentation/PresentationConnectionList.h"
|
| #include "public/platform/modules/presentation/WebPresentationClient.h"
|
| @@ -19,6 +20,7 @@ namespace blink {
|
| PresentationReceiver::PresentationReceiver(LocalFrame* frame,
|
| WebPresentationClient* client)
|
| : ContextClient(frame) {
|
| + recordOriginTypeAccess(frame->document());
|
| m_connectionList = new PresentationConnectionList(frame->document());
|
|
|
| if (client)
|
| @@ -65,6 +67,15 @@ void PresentationReceiver::registerConnection(
|
| m_connectionList->addConnection(connection);
|
| }
|
|
|
| +void PresentationReceiver::recordOriginTypeAccess(Document* document) const {
|
| + DCHECK(document);
|
| + if (document->isSecureContext()) {
|
| + UseCounter::count(document, UseCounter::PresentationReceiverSecureOrigin);
|
| + } else {
|
| + UseCounter::count(document, UseCounter::PresentationReceiverInsecureOrigin);
|
| + }
|
| +}
|
| +
|
| DEFINE_TRACE(PresentationReceiver) {
|
| visitor->trace(m_connectionList);
|
| visitor->trace(m_connectionListProperty);
|
|
|