Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp |
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp |
index e54315d65277fed9fa01869b3dd762bb52a1f38c..7064e44dec15b10d480d2c09dc9e0bb44d4f4f0e 100644 |
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp |
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp |
@@ -45,10 +45,28 @@ ServiceWorkerClient* ServiceWorkerClient::Create( |
ServiceWorkerClient::ServiceWorkerClient(const WebServiceWorkerClientInfo& info) |
: uuid_(info.uuid), |
url_(info.url.GetString()), |
+ type_(info.client_type), |
frame_type_(info.frame_type) {} |
ServiceWorkerClient::~ServiceWorkerClient() {} |
+String ServiceWorkerClient::type() const { |
+ switch (type_) { |
+ case kWebServiceWorkerClientTypeWindow: |
+ return "window"; |
+ case kWebServiceWorkerClientTypeWorker: |
+ return "worker"; |
+ case kWebServiceWorkerClientTypeSharedWorker: |
+ return "sharedworker"; |
+ case kWebServiceWorkerClientTypeAll: |
+ NOTREACHED(); |
+ return String(); |
+ } |
+ |
+ NOTREACHED(); |
+ return String(); |
+} |
+ |
String ServiceWorkerClient::frameType() const { |
switch (frame_type_) { |
case WebURLRequest::kFrameTypeAuxiliary: |