OLD | NEW |
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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 ServiceWorkerProcessManager* process_manager() { | 72 ServiceWorkerProcessManager* process_manager() { |
73 return process_manager_.get(); | 73 return process_manager_.get(); |
74 } | 74 } |
75 | 75 |
76 // ServiceWorkerContext implementation: | 76 // ServiceWorkerContext implementation: |
77 void RegisterServiceWorker(const GURL& pattern, | 77 void RegisterServiceWorker(const GURL& pattern, |
78 const GURL& script_url, | 78 const GURL& script_url, |
79 const ResultCallback& continuation) override; | 79 const ResultCallback& continuation) override; |
80 void UnregisterServiceWorker(const GURL& pattern, | 80 void UnregisterServiceWorker(const GURL& pattern, |
81 const ResultCallback& continuation) override; | 81 const ResultCallback& continuation) override; |
| 82 void GetUserData(int64 registration_id, |
| 83 const std::string& key, |
| 84 const GetUserDataCallback& callback) override; |
| 85 void StoreUserData(int64 registration_id, |
| 86 const GURL& origin, |
| 87 const std::string& key, |
| 88 const std::string& data, |
| 89 const ResultCallback& callback) override; |
| 90 void ClearUserData(int64 registration_id, |
| 91 const std::string& key, |
| 92 const ResultCallback& callback) override; |
82 void CanHandleMainResourceOffline( | 93 void CanHandleMainResourceOffline( |
83 const GURL& url, | 94 const GURL& url, |
84 const GURL& first_party, | 95 const GURL& first_party, |
85 const net::CompletionCallback& callback) override; | 96 const net::CompletionCallback& callback) override; |
86 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override; | 97 void GetAllOriginsInfo(const GetUsageInfoCallback& callback) override; |
87 void DeleteForOrigin(const GURL& origin_url) override; | 98 void DeleteForOrigin(const GURL& origin_url) override; |
88 | 99 |
89 // DeleteForOrigin with completion callback. Does not exit early, and returns | 100 // DeleteForOrigin with completion callback. Does not exit early, and returns |
90 // false if one or more of the deletions fail. | 101 // false if one or more of the deletions fail. |
91 virtual void DeleteForOrigin(const GURL& origin_url, | 102 virtual void DeleteForOrigin(const GURL& origin_url, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // Initialized in Init(); true if the user data directory is empty. | 149 // Initialized in Init(); true if the user data directory is empty. |
139 bool is_incognito_; | 150 bool is_incognito_; |
140 | 151 |
141 // Raw pointer to the StoragePartitionImpl owning |this|. | 152 // Raw pointer to the StoragePartitionImpl owning |this|. |
142 StoragePartitionImpl* storage_partition_; | 153 StoragePartitionImpl* storage_partition_; |
143 }; | 154 }; |
144 | 155 |
145 } // namespace content | 156 } // namespace content |
146 | 157 |
147 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 158 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
OLD | NEW |