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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerClient.cpp

Issue 1040993003: ServiceWorker: Support non-window clients in Clients.matchAll (2/2 blink) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/serviceworkers/ServiceWorkerClient.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerClient.cpp b/Source/modules/serviceworkers/ServiceWorkerClient.cpp
index d136e97474fa6d2e0faa2956019b1f209caac763..24cff42762ec940277f4db97a4dbebc580dc0cd6 100644
--- a/Source/modules/serviceworkers/ServiceWorkerClient.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerClient.cpp
@@ -22,6 +22,7 @@ ServiceWorkerClient* ServiceWorkerClient::create(const WebServiceWorkerClientInf
ServiceWorkerClient::ServiceWorkerClient(const WebServiceWorkerClientInfo& info)
: m_uuid(info.uuid)
, m_url(info.url.string())
+ , m_frameType(info.frameType)
{
}
@@ -29,6 +30,23 @@ ServiceWorkerClient::~ServiceWorkerClient()
{
}
+String ServiceWorkerClient::frameType() const
+{
+ switch (m_frameType) {
+ case WebURLRequest::FrameTypeAuxiliary:
+ return "auxiliary";
+ case WebURLRequest::FrameTypeNested:
+ return "nested";
+ case WebURLRequest::FrameTypeNone:
+ return "none";
+ case WebURLRequest::FrameTypeTopLevel:
+ return "top-level";
+ }
+
+ ASSERT_NOT_REACHED();
+ return String();
+}
+
void ServiceWorkerClient::postMessage(ExecutionContext* context, PassRefPtr<SerializedScriptValue> message, const MessagePortArray* ports, ExceptionState& exceptionState)
{
// Disentangle the port in preparation for sending it to the remote context.

Powered by Google App Engine
This is Rietveld 408576698