| 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_BROWSER_APPCACHE_APPCACHE_HOST_H_ | 5 #ifndef WEBKIT_BROWSER_APPCACHE_APPCACHE_HOST_H_ |
| 6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_HOST_H_ | 6 #define WEBKIT_BROWSER_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/browser/appcache/appcache_group.h" | 13 #include "webkit/browser/appcache/appcache_group.h" |
| 14 #include "webkit/browser/appcache/appcache_service.h" | 14 #include "webkit/browser/appcache/appcache_service.h" |
| 15 #include "webkit/browser/appcache/appcache_storage.h" | 15 #include "webkit/browser/appcache/appcache_storage.h" |
| 16 #include "webkit/browser/webkit_storage_browser_export.h" |
| 16 #include "webkit/common/appcache/appcache_interfaces.h" | 17 #include "webkit/common/appcache/appcache_interfaces.h" |
| 17 #include "webkit/glue/resource_type.h" | 18 #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 WEBKIT_STORAGE_EXPORT AppCacheHost | 35 class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheHost |
| 36 : public AppCacheStorage::Delegate, | 36 : public AppCacheStorage::Delegate, |
| 37 public AppCacheGroup::UpdateObserver { | 37 public AppCacheGroup::UpdateObserver { |
| 38 public: | 38 public: |
| 39 | 39 |
| 40 class WEBKIT_STORAGE_EXPORT Observer { | 40 class WEBKIT_STORAGE_BROWSER_EXPORT Observer { |
| 41 public: | 41 public: |
| 42 // Called just after the cache selection algorithm completes. | 42 // Called just after the cache selection algorithm completes. |
| 43 virtual void OnCacheSelectionComplete(AppCacheHost* host) = 0; | 43 virtual void OnCacheSelectionComplete(AppCacheHost* host) = 0; |
| 44 | 44 |
| 45 // Called just prior to the instance being deleted. | 45 // Called just prior to the instance being deleted. |
| 46 virtual void OnDestructionImminent(AppCacheHost* host) = 0; | 46 virtual void OnDestructionImminent(AppCacheHost* host) = 0; |
| 47 | 47 |
| 48 virtual ~Observer() {} | 48 virtual ~Observer() {} |
| 49 }; | 49 }; |
| 50 | 50 |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SelectCacheAllowed); | 282 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SelectCacheAllowed); |
| 283 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SelectCacheBlocked); | 283 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SelectCacheBlocked); |
| 284 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); | 284 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); |
| 285 | 285 |
| 286 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); | 286 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 } // namespace appcache | 289 } // namespace appcache |
| 290 | 290 |
| 291 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_HOST_H_ | 291 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_HOST_H_ |
| OLD | NEW |