[email protected] | f786717 | 2012-07-11 07:04:07 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | 1eaa4f7 | 2011-02-24 23:37:35 | [diff] [blame] | 5 | #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ |
| 6 | #define CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 7 | |
[email protected] | ec5c192 | 2010-07-28 03:14:37 | [diff] [blame] | 8 | #include <string> |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 9 | #include <vector> |
[email protected] | 0082d7e0d | 2010-02-27 14:34:12 | [diff] [blame] | 10 | |
Nicholas Verne | 07e9c645 | 2017-12-13 04:12:55 | [diff] [blame] | 11 | #include "content/common/appcache.mojom.h" |
[email protected] | 98d6d456 | 2014-06-25 20:57:55 | [diff] [blame] | 12 | #include "content/common/appcache_interfaces.h" |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 13 | |
[email protected] | de551c6 | 2012-10-24 20:50:08 | [diff] [blame] | 14 | namespace content { |
| 15 | |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 16 | // Sends appcache related messages to a child process. |
[email protected] | 98d6d456 | 2014-06-25 20:57:55 | [diff] [blame] | 17 | class AppCacheFrontendProxy : public AppCacheFrontend { |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 18 | public: |
Nicholas Verne | 07e9c645 | 2017-12-13 04:12:55 | [diff] [blame] | 19 | explicit AppCacheFrontendProxy(int process_id); |
| 20 | ~AppCacheFrontendProxy() override; |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 21 | |
| 22 | // AppCacheFrontend methods |
dcheng | c2282aa | 2014-10-21 12:07:58 | [diff] [blame] | 23 | void OnCacheSelected(int host_id, const AppCacheInfo& info) override; |
| 24 | void OnStatusChanged(const std::vector<int>& host_ids, |
| 25 | AppCacheStatus status) override; |
| 26 | void OnEventRaised(const std::vector<int>& host_ids, |
| 27 | AppCacheEventID event_id) override; |
| 28 | void OnProgressEventRaised(const std::vector<int>& host_ids, |
| 29 | const GURL& url, |
| 30 | int num_total, |
| 31 | int num_complete) override; |
| 32 | void OnErrorEventRaised(const std::vector<int>& host_ids, |
| 33 | const AppCacheErrorDetails& details) override; |
| 34 | void OnLogMessage(int host_id, |
| 35 | AppCacheLogLevel log_level, |
| 36 | const std::string& message) override; |
| 37 | void OnContentBlocked(int host_id, const GURL& manifest_url) override; |
Anantanarayanan Iyengar | 2130d27 | 2017-09-01 18:21:14 | [diff] [blame] | 38 | void OnSetSubresourceFactory( |
| 39 | int host_id, |
John Abd-El-Malek | b165dc5 | 2018-01-18 17:12:18 | [diff] [blame] | 40 | network::mojom::URLLoaderFactoryPtr url_loader_factory) override; |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 41 | |
| 42 | private: |
Nicholas Verne | 07e9c645 | 2017-12-13 04:12:55 | [diff] [blame] | 43 | mojom::AppCacheFrontend* GetAppCacheFrontend(); |
| 44 | |
| 45 | const int process_id_; |
| 46 | mojom::AppCacheFrontendPtr app_cache_renderer_ptr_; |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 47 | }; |
| 48 | |
[email protected] | de551c6 | 2012-10-24 20:50:08 | [diff] [blame] | 49 | } // namespace content |
| 50 | |
[email protected] | 1eaa4f7 | 2011-02-24 23:37:35 | [diff] [blame] | 51 | #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ |