| Index: content/browser/shared_worker/shared_worker_host.cc
|
| diff --git a/content/browser/service_worker/service_worker_registration.cc b/content/browser/shared_worker/shared_worker_host.cc
|
| similarity index 24%
|
| copy from content/browser/service_worker/service_worker_registration.cc
|
| copy to content/browser/shared_worker/shared_worker_host.cc
|
| index e3a7e9597b40c9bddd14ccff7280eefea8818033..9b61c749f4ba5e2ae8f856eb4238d7dbc4a44929 100644
|
| --- a/content/browser/service_worker/service_worker_registration.cc
|
| +++ b/content/browser/shared_worker/shared_worker_host.cc
|
| @@ -1,44 +1,31 @@
|
| -// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// 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/browser/service_worker/service_worker_registration.h"
|
| +#include "content/browser/shared_worker/shared_worker_host.h"
|
|
|
| +#include "content/browser/shared_worker/shared_worker_instance.h"
|
| +#include "content/browser/shared_worker/shared_worker_message_filter.h"
|
| #include "content/public/browser/browser_thread.h"
|
|
|
| namespace content {
|
|
|
| -ServiceWorkerRegistration::ServiceWorkerRegistration(const GURL& pattern,
|
| - const GURL& script_url,
|
| - int64 registration_id)
|
| - : pattern_(pattern),
|
| - script_url_(script_url),
|
| - registration_id_(registration_id),
|
| - next_version_id_(0L),
|
| - is_shutdown_(false) {
|
| +SharedWorkerHost::SharedWorkerHost(SharedWorkerInstance* instance)
|
| + : instance_(instance),
|
| + worker_route_id_(MSG_ROUTING_NONE) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| }
|
|
|
| -ServiceWorkerRegistration::~ServiceWorkerRegistration() {
|
| +SharedWorkerHost::~SharedWorkerHost() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| - DCHECK(is_shutdown_);
|
| }
|
|
|
| -void ServiceWorkerRegistration::Shutdown() {
|
| - DCHECK(!is_shutdown_);
|
| - if (active_version_)
|
| - active_version_->Shutdown();
|
| - active_version_ = NULL;
|
| - if (pending_version_)
|
| - pending_version_->Shutdown();
|
| - pending_version_ = NULL;
|
| - is_shutdown_ = true;
|
| -}
|
| -
|
| -void ServiceWorkerRegistration::ActivatePendingVersion() {
|
| - active_version_->Shutdown();
|
| - active_version_ = pending_version_;
|
| - pending_version_ = NULL;
|
| +bool SharedWorkerHost::Init(SharedWorkerMessageFilter* filter) {
|
| + DCHECK(worker_route_id_ == MSG_ROUTING_NONE);
|
| + worker_route_id_ = filter->GetNextRoutingID();
|
| + // TODO(horo): implement this.
|
| + NOTIMPLEMENTED();
|
| + return false;
|
| }
|
|
|
| } // namespace content
|
|
|