OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_APPCACHE_APPCACHE_HOST_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_HOST_H_ |
6 #define WEBKIT_APPCACHE_APPCACHE_HOST_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_HOST_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
13 #include "webkit/appcache/appcache_group.h" | 13 #include "webkit/appcache/appcache_group.h" |
14 #include "webkit/appcache/appcache_interfaces.h" | 14 #include "webkit/appcache/appcache_interfaces.h" |
15 #include "webkit/appcache/appcache_export.h" | |
16 #include "webkit/appcache/appcache_service.h" | 15 #include "webkit/appcache/appcache_service.h" |
17 #include "webkit/appcache/appcache_storage.h" | 16 #include "webkit/appcache/appcache_storage.h" |
18 #include "webkit/glue/resource_type.h" | 17 #include "webkit/glue/resource_type.h" |
| 18 #include "webkit/storage/webkit_storage_export.h" |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 class URLRequest; | 21 class URLRequest; |
22 } // namespace net | 22 } // namespace net |
23 | 23 |
24 namespace appcache { | 24 namespace appcache { |
25 | 25 |
26 class AppCache; | 26 class AppCache; |
27 class AppCacheFrontend; | 27 class AppCacheFrontend; |
28 class AppCacheRequestHandler; | 28 class AppCacheRequestHandler; |
29 | 29 |
30 typedef base::Callback<void(Status, void*)> GetStatusCallback; | 30 typedef base::Callback<void(Status, void*)> GetStatusCallback; |
31 typedef base::Callback<void(bool, void*)> StartUpdateCallback; | 31 typedef base::Callback<void(bool, void*)> StartUpdateCallback; |
32 typedef base::Callback<void(bool, void*)> SwapCacheCallback; | 32 typedef base::Callback<void(bool, void*)> SwapCacheCallback; |
33 | 33 |
34 // Server-side representation of an application cache host. | 34 // Server-side representation of an application cache host. |
35 class APPCACHE_EXPORT AppCacheHost : public AppCacheStorage::Delegate, | 35 class WEBKIT_STORAGE_EXPORT AppCacheHost |
36 public AppCacheGroup::UpdateObserver { | 36 : public AppCacheStorage::Delegate, |
| 37 public AppCacheGroup::UpdateObserver { |
37 public: | 38 public: |
38 | 39 |
39 class APPCACHE_EXPORT Observer { | 40 class WEBKIT_STORAGE_EXPORT Observer { |
40 public: | 41 public: |
41 // Called just after the cache selection algorithm completes. | 42 // Called just after the cache selection algorithm completes. |
42 virtual void OnCacheSelectionComplete(AppCacheHost* host) = 0; | 43 virtual void OnCacheSelectionComplete(AppCacheHost* host) = 0; |
43 | 44 |
44 // Called just prior to the instance being deleted. | 45 // Called just prior to the instance being deleted. |
45 virtual void OnDestructionImminent(AppCacheHost* host) = 0; | 46 virtual void OnDestructionImminent(AppCacheHost* host) = 0; |
46 | 47 |
47 virtual ~Observer() {} | 48 virtual ~Observer() {} |
48 }; | 49 }; |
49 | 50 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SelectCacheAllowed); | 282 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SelectCacheAllowed); |
282 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SelectCacheBlocked); | 283 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SelectCacheBlocked); |
283 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); | 284 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); |
284 | 285 |
285 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); | 286 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); |
286 }; | 287 }; |
287 | 288 |
288 } // namespace appcache | 289 } // namespace appcache |
289 | 290 |
290 #endif // WEBKIT_APPCACHE_APPCACHE_HOST_H_ | 291 #endif // WEBKIT_APPCACHE_APPCACHE_HOST_H_ |
OLD | NEW |