OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_APPCACHE_APPCACHE_NAVIGATION_HANDLE_CORE_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_NAVIGATION_HANDLE_CORE_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_NAVIGATION_HANDLE_CORE_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_NAVIGATION_HANDLE_CORE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // Returns the raw AppCacheHost pointer. Ownership remains with this class. | 37 // Returns the raw AppCacheHost pointer. Ownership remains with this class. |
38 AppCacheHost* host() { return precreated_host_.get(); } | 38 AppCacheHost* host() { return precreated_host_.get(); } |
39 | 39 |
40 // Initializes this instance. Should be called on the IO thread. | 40 // Initializes this instance. Should be called on the IO thread. |
41 void Initialize(); | 41 void Initialize(); |
42 | 42 |
43 // Returns the precreated AppCacheHost pointer. Ownership of the host is | 43 // Returns the precreated AppCacheHost pointer. Ownership of the host is |
44 // released here. | 44 // released here. |
45 static std::unique_ptr<AppCacheHost> GetPrecreatedHost(int host_id); | 45 static std::unique_ptr<AppCacheHost> GetPrecreatedHost(int host_id); |
46 | 46 |
47 AppCacheServiceImpl* GetAppCacheService(); | 47 ChromeAppCacheService* GetAppCacheService(); |
48 | 48 |
49 protected: | 49 protected: |
50 // AppCacheFrontend methods | 50 // AppCacheFrontend methods |
51 // We don't expect calls on the AppCacheFrontend methods while the | 51 // We don't expect calls on the AppCacheFrontend methods while the |
52 // AppCacheHost is not registered with the AppCacheBackend. | 52 // AppCacheHost is not registered with the AppCacheBackend. |
53 void OnCacheSelected(int host_id, const AppCacheInfo& info) override; | 53 void OnCacheSelected(int host_id, const AppCacheInfo& info) override; |
54 void OnStatusChanged(const std::vector<int>& host_ids, | 54 void OnStatusChanged(const std::vector<int>& host_ids, |
55 AppCacheStatus status) override; | 55 AppCacheStatus status) override; |
56 void OnEventRaised(const std::vector<int>& host_ids, | 56 void OnEventRaised(const std::vector<int>& host_ids, |
57 AppCacheEventID event_id) override; | 57 AppCacheEventID event_id) override; |
(...skipping 13 matching lines...) Expand all Loading... |
71 scoped_refptr<ChromeAppCacheService> appcache_service_; | 71 scoped_refptr<ChromeAppCacheService> appcache_service_; |
72 int appcache_host_id_; | 72 int appcache_host_id_; |
73 base::WeakPtr<AppCacheNavigationHandle> ui_handle_; | 73 base::WeakPtr<AppCacheNavigationHandle> ui_handle_; |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(AppCacheNavigationHandleCore); | 75 DISALLOW_COPY_AND_ASSIGN(AppCacheNavigationHandleCore); |
76 }; | 76 }; |
77 | 77 |
78 } // namespace content | 78 } // namespace content |
79 | 79 |
80 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_NAVIGATION_HANDLE_CORE_H_ | 80 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_NAVIGATION_HANDLE_CORE_H_ |
OLD | NEW |