OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/supports_user_data.h" | 14 #include "base/supports_user_data.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/public/browser/zoom_level_delegate.h" | 16 #include "content/public/browser/zoom_level_delegate.h" |
| 17 #include "content/public/common/push_event_payload.h" |
17 #include "content/public/common/push_messaging_status.h" | 18 #include "content/public/common/push_messaging_status.h" |
18 | 19 |
19 class GURL; | 20 class GURL; |
20 | 21 |
21 namespace base { | 22 namespace base { |
22 class FilePath; | 23 class FilePath; |
23 class Time; | 24 class Time; |
24 } | 25 } |
25 | 26 |
26 namespace storage { | 27 namespace storage { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 int64_t size, | 102 int64_t size, |
102 const base::Time& expected_modification_time, | 103 const base::Time& expected_modification_time, |
103 const BlobCallback& callback); | 104 const BlobCallback& callback); |
104 | 105 |
105 // Delivers a push message with |data| to the Service Worker identified by | 106 // Delivers a push message with |data| to the Service Worker identified by |
106 // |origin| and |service_worker_registration_id|. | 107 // |origin| and |service_worker_registration_id|. |
107 static void DeliverPushMessage( | 108 static void DeliverPushMessage( |
108 BrowserContext* browser_context, | 109 BrowserContext* browser_context, |
109 const GURL& origin, | 110 const GURL& origin, |
110 int64_t service_worker_registration_id, | 111 int64_t service_worker_registration_id, |
111 const std::string& data, | 112 const content::PushEventPayload& payload, |
112 const base::Callback<void(PushDeliveryStatus)>& callback); | 113 const base::Callback<void(PushDeliveryStatus)>& callback); |
113 | 114 |
114 static void NotifyWillBeDestroyed(BrowserContext* browser_context); | 115 static void NotifyWillBeDestroyed(BrowserContext* browser_context); |
115 | 116 |
116 // Ensures that the corresponding ResourceContext is initialized. Normally the | 117 // Ensures that the corresponding ResourceContext is initialized. Normally the |
117 // BrowserContext initializs the corresponding getters when its objects are | 118 // BrowserContext initializs the corresponding getters when its objects are |
118 // created, but if the embedder wants to pass the ResourceContext to another | 119 // created, but if the embedder wants to pass the ResourceContext to another |
119 // thread before they use BrowserContext, they should call this to make sure | 120 // thread before they use BrowserContext, they should call this to make sure |
120 // that the ResourceContext is ready. | 121 // that the ResourceContext is ready. |
121 static void EnsureResourceContextInitialized(BrowserContext* browser_context); | 122 static void EnsureResourceContextInitialized(BrowserContext* browser_context); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 virtual PermissionManager* GetPermissionManager() = 0; | 196 virtual PermissionManager* GetPermissionManager() = 0; |
196 | 197 |
197 // Returns the BackgroundSyncController associated with that context if any, | 198 // Returns the BackgroundSyncController associated with that context if any, |
198 // nullptr otherwise. | 199 // nullptr otherwise. |
199 virtual BackgroundSyncController* GetBackgroundSyncController() = 0; | 200 virtual BackgroundSyncController* GetBackgroundSyncController() = 0; |
200 }; | 201 }; |
201 | 202 |
202 } // namespace content | 203 } // namespace content |
203 | 204 |
204 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 205 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |