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

Unified Diff: content/browser/service_worker/service_worker_context_wrapper.h

Issue 208843004: Add the beginning of a public Service Worker API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix #include guard name Created 6 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: content/browser/service_worker/service_worker_context_wrapper.h
diff --git a/content/browser/service_worker/service_worker_context_wrapper.h b/content/browser/service_worker/service_worker_context_wrapper.h
index 1b9b6523907a51058e06f479e1b6da7312648909..a55c04418f630a539b4d5ae0952bce24659547b6 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.h
+++ b/content/browser/service_worker/service_worker_context_wrapper.h
@@ -8,8 +8,9 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "content/browser/service_worker/service_worker_context.h"
+#include "content/browser/service_worker/service_worker_context_core.h"
#include "content/common/content_export.h"
+#include "content/public/browser/service_worker_context.h"
namespace base {
class FilePath;
@@ -42,10 +43,35 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
// The core context is only for use on the IO thread.
ServiceWorkerContextCore* context();
+ // ServiceWorkerContext implementation:
+ virtual void RegisterServiceWorker(const GURL& pattern,
+ const GURL& script_url,
+ int source_process_id,
+ const RegistrationCallback& continuation)
+ OVERRIDE;
+
+ virtual void UnregisterServiceWorker(
+ const GURL& pattern,
+ int source_process_id,
+ const UnregistrationCallback& continuation) OVERRIDE;
+
private:
friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>;
virtual ~ServiceWorkerContextWrapper();
+ void RegisterServiceWorkerOnIO(const GURL& pattern,
+ const GURL& script_url,
+ int source_process_id,
+ const RegistrationCallback& continuation);
+ void FinishRegistrationOnIO(const RegistrationCallback& continuation,
+ ServiceWorkerStatusCode status,
+ int64 registration_id);
+ void UnregisterServiceWorkerOnIO(const GURL& pattern,
+ int source_process_id,
+ const UnregistrationCallback& continuation);
+ void FinishUnregistrationOnIO(const RegistrationCallback& continuation,
+ ServiceWorkerStatusCode status);
+
scoped_ptr<ServiceWorkerContextCore> context_core_;
};

Powered by Google App Engine
This is Rietveld 408576698