OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_INTERNALS_UI_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INTERNALS_UI_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INTERNALS_UI_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INTERNALS_UI_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 void AddContextFromStoragePartition(StoragePartition* partition); | 45 void AddContextFromStoragePartition(StoragePartition* partition); |
46 | 46 |
47 void RemoveObserverFromStoragePartition(StoragePartition* partition); | 47 void RemoveObserverFromStoragePartition(StoragePartition* partition); |
48 | 48 |
49 // Called from Javascript. | 49 // Called from Javascript. |
50 void GetOptions(const base::ListValue* args); | 50 void GetOptions(const base::ListValue* args); |
51 void SetOption(const base::ListValue* args); | 51 void SetOption(const base::ListValue* args); |
52 void GetAllRegistrations(const base::ListValue* args); | 52 void GetAllRegistrations(const base::ListValue* args); |
53 void CallServiceWorkerVersionMethod(ServiceWorkerVersionMethod method, | 53 void CallServiceWorkerVersionMethod(ServiceWorkerVersionMethod method, |
54 const base::ListValue* args); | 54 const base::ListValue* args); |
55 void DispatchPushEvent(const base::ListValue* args); | |
56 void InspectWorker(const base::ListValue* args); | 55 void InspectWorker(const base::ListValue* args); |
57 void Unregister(const base::ListValue* args); | 56 void Unregister(const base::ListValue* args); |
58 void StartWorker(const base::ListValue* args); | 57 void StartWorker(const base::ListValue* args); |
59 | 58 |
60 bool GetServiceWorkerContext( | 59 bool GetServiceWorkerContext( |
61 int partition_id, | 60 int partition_id, |
62 scoped_refptr<ServiceWorkerContextWrapper>* context) const; | 61 scoped_refptr<ServiceWorkerContextWrapper>* context) const; |
63 void FindContext(int partition_id, | 62 void FindContext(int partition_id, |
64 StoragePartition** result_partition, | 63 StoragePartition** result_partition, |
65 StoragePartition* storage_partition) const; | 64 StoragePartition* storage_partition) const; |
66 | 65 |
67 void UnregisterWithScope(scoped_refptr<ServiceWorkerContextWrapper> context, | 66 void UnregisterWithScope(scoped_refptr<ServiceWorkerContextWrapper> context, |
68 const GURL& scope, | 67 const GURL& scope, |
69 const StatusCallback& callback) const; | 68 const StatusCallback& callback) const; |
70 | 69 |
71 base::ScopedPtrHashMap<uintptr_t, scoped_ptr<PartitionObserver>> observers_; | 70 base::ScopedPtrHashMap<uintptr_t, scoped_ptr<PartitionObserver>> observers_; |
72 int next_partition_id_; | 71 int next_partition_id_; |
73 }; | 72 }; |
74 | 73 |
75 } // namespace content | 74 } // namespace content |
76 | 75 |
77 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INTERNALS_UI_H_ | 76 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INTERNALS_UI_H_ |
OLD | NEW |