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

Side by Side 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: Switch to a bool 'success' result. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/browser/service_worker/service_worker_context.h" 11 #include "content/browser/service_worker/service_worker_context_core.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/browser/service_worker_context.h"
13 14
14 namespace base { 15 namespace base {
15 class FilePath; 16 class FilePath;
16 } 17 }
17 18
18 namespace quota { 19 namespace quota {
19 class QuotaManagerProxy; 20 class QuotaManagerProxy;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
(...skipping 12 matching lines...) Expand all
35 36
36 // Init and Shutdown are for use on the UI thread when the profile, 37 // Init and Shutdown are for use on the UI thread when the profile,
37 // storagepartition is being setup and torn down. 38 // storagepartition is being setup and torn down.
38 void Init(const base::FilePath& user_data_directory, 39 void Init(const base::FilePath& user_data_directory,
39 quota::QuotaManagerProxy* quota_manager_proxy); 40 quota::QuotaManagerProxy* quota_manager_proxy);
40 void Shutdown(); 41 void Shutdown();
41 42
42 // The core context is only for use on the IO thread. 43 // The core context is only for use on the IO thread.
43 ServiceWorkerContextCore* context(); 44 ServiceWorkerContextCore* context();
44 45
46 // ServiceWorkerContext implementation:
47 virtual void RegisterServiceWorker(const GURL& pattern,
48 const GURL& script_url,
49 int source_process_id,
50 const ResultCallback& continuation)
51 OVERRIDE;
52
53 virtual void UnregisterServiceWorker(const GURL& pattern,
54 int source_process_id,
55 const ResultCallback& continuation)
56 OVERRIDE;
57
45 private: 58 private:
46 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; 59 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>;
47 virtual ~ServiceWorkerContextWrapper(); 60 virtual ~ServiceWorkerContextWrapper();
48 61
49 scoped_ptr<ServiceWorkerContextCore> context_core_; 62 scoped_ptr<ServiceWorkerContextCore> context_core_;
50 }; 63 };
51 64
52 } // namespace content 65 } // namespace content
53 66
54 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ 67 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698