forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ServiceWorker: Implement ServiceWorkerRegistration [2/3]
This implements WebServiceWorkerRegistration based on the latest spec and resolves a register promise with it instead of a ServiceWorker object. Spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#service-worker-registration-obj [1] Blink: https://codereview.chromium.org/413123002/ [2] Chromium: This patch. [3] Blink: Remove the macro and fix a bunch of layout tests. BUG=396400 TEST=compile (tests will be added by subsequent patches) Review URL: https://codereview.chromium.org/415963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285599 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
nhiroki@chromium.org
committed
Jul 25, 2014
1 parent
bdceb3b
commit 8ec879c
Showing
7 changed files
with
79 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
content/child/service_worker/web_service_worker_registration_impl.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "content/child/service_worker/web_service_worker_registration_impl.h" | ||
|
||
#include "content/common/service_worker/service_worker_types.h" | ||
|
||
namespace content { | ||
|
||
WebServiceWorkerRegistrationImpl::WebServiceWorkerRegistrationImpl( | ||
const ServiceWorkerObjectInfo& info) | ||
: scope_(info.scope) { | ||
} | ||
|
||
WebServiceWorkerRegistrationImpl::~WebServiceWorkerRegistrationImpl() { | ||
} | ||
|
||
blink::WebURL WebServiceWorkerRegistrationImpl::scope() const { | ||
return scope_; | ||
} | ||
|
||
} // namespace content |
32 changes: 32 additions & 0 deletions
32
content/child/service_worker/web_service_worker_registration_impl.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ | ||
#define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ | ||
|
||
#include "base/compiler_specific.h" | ||
#include "third_party/WebKit/public/platform/WebServiceWorkerRegistration.h" | ||
|
||
namespace content { | ||
|
||
struct ServiceWorkerObjectInfo; | ||
|
||
class WebServiceWorkerRegistrationImpl | ||
: NON_EXPORTED_BASE(public blink::WebServiceWorkerRegistration) { | ||
public: | ||
explicit WebServiceWorkerRegistrationImpl( | ||
const ServiceWorkerObjectInfo& info); | ||
virtual ~WebServiceWorkerRegistrationImpl(); | ||
|
||
virtual blink::WebURL scope() const; | ||
|
||
private: | ||
const GURL scope_; | ||
|
||
DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl); | ||
}; | ||
|
||
} // namespace content | ||
|
||
#endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters