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" |
(...skipping 30 matching lines...) Expand all Loading... |
41 virtual void OnCacheSelectionComplete(AppCacheHost* host) = 0; | 41 virtual void OnCacheSelectionComplete(AppCacheHost* host) = 0; |
42 | 42 |
43 // Called just prior to the instance being deleted. | 43 // Called just prior to the instance being deleted. |
44 virtual void OnDestructionImminent(AppCacheHost* host) = 0; | 44 virtual void OnDestructionImminent(AppCacheHost* host) = 0; |
45 | 45 |
46 virtual ~Observer() {} | 46 virtual ~Observer() {} |
47 }; | 47 }; |
48 | 48 |
49 AppCacheHost(int host_id, AppCacheFrontend* frontend, | 49 AppCacheHost(int host_id, AppCacheFrontend* frontend, |
50 AppCacheService* service); | 50 AppCacheService* service); |
51 ~AppCacheHost(); | 51 virtual ~AppCacheHost(); |
52 | 52 |
53 // Adds/removes an observer, the AppCacheHost does not take | 53 // Adds/removes an observer, the AppCacheHost does not take |
54 // ownership of the observer. | 54 // ownership of the observer. |
55 void AddObserver(Observer* observer); | 55 void AddObserver(Observer* observer); |
56 void RemoveObserver(Observer* observer); | 56 void RemoveObserver(Observer* observer); |
57 | 57 |
58 // Support for cache selection and scriptable method calls. | 58 // Support for cache selection and scriptable method calls. |
59 void SelectCache(const GURL& document_url, | 59 void SelectCache(const GURL& document_url, |
60 const int64 cache_document_was_loaded_from, | 60 const int64 cache_document_was_loaded_from, |
61 const GURL& manifest_url); | 61 const GURL& manifest_url); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SetSwappableCache); | 257 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SetSwappableCache); |
258 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, ForDedicatedWorker); | 258 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, ForDedicatedWorker); |
259 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); | 259 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); |
260 | 260 |
261 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); | 261 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); |
262 }; | 262 }; |
263 | 263 |
264 } // namespace appcache | 264 } // namespace appcache |
265 | 265 |
266 #endif // WEBKIT_APPCACHE_APPCACHE_HOST_H_ | 266 #endif // WEBKIT_APPCACHE_APPCACHE_HOST_H_ |
OLD | NEW |