[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 | |
[email protected] | 98d6d456 | 2014-06-25 20:57:55 | [diff] [blame] | 11 | #include "content/common/appcache_interfaces.h" |
[email protected] | d84effeb | 2012-06-25 17:03:10 | [diff] [blame] | 12 | #include "ipc/ipc_sender.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: |
[email protected] | d84effeb | 2012-06-25 17:03:10 | [diff] [blame] | 19 | explicit AppCacheFrontendProxy(IPC::Sender* sender); |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 20 | |
| 21 | // AppCacheFrontend methods |
dcheng | c2282aa | 2014-10-21 12:07:58 | [diff] [blame^] | 22 | void OnCacheSelected(int host_id, const AppCacheInfo& info) override; |
| 23 | void OnStatusChanged(const std::vector<int>& host_ids, |
| 24 | AppCacheStatus status) override; |
| 25 | void OnEventRaised(const std::vector<int>& host_ids, |
| 26 | AppCacheEventID event_id) override; |
| 27 | void OnProgressEventRaised(const std::vector<int>& host_ids, |
| 28 | const GURL& url, |
| 29 | int num_total, |
| 30 | int num_complete) override; |
| 31 | void OnErrorEventRaised(const std::vector<int>& host_ids, |
| 32 | const AppCacheErrorDetails& details) override; |
| 33 | void OnLogMessage(int host_id, |
| 34 | AppCacheLogLevel log_level, |
| 35 | const std::string& message) override; |
| 36 | void OnContentBlocked(int host_id, const GURL& manifest_url) override; |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 37 | |
| 38 | private: |
[email protected] | d84effeb | 2012-06-25 17:03:10 | [diff] [blame] | 39 | IPC::Sender* sender_; |
[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame] | 40 | }; |
| 41 | |
[email protected] | de551c6 | 2012-10-24 20:50:08 | [diff] [blame] | 42 | } // namespace content |
| 43 | |
[email protected] | 1eaa4f7 | 2011-02-24 23:37:35 | [diff] [blame] | 44 | #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ |