[email protected] | f430b571 | 2009-08-21 21:46:31 | [diff] [blame^] | 1 | // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_COMMON_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ |
| 6 | #define CHROME_COMMON_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ |
| 7 | |
| 8 | #include <vector> |
| 9 | #include "ipc/ipc_message.h" |
| 10 | #include "webkit/appcache/appcache_interfaces.h" |
| 11 | |
| 12 | // Sends appcache related messages to a child process. |
| 13 | class AppCacheFrontendProxy : public appcache::AppCacheFrontend { |
| 14 | public: |
| 15 | AppCacheFrontendProxy() : sender_(NULL) {} |
| 16 | void set_sender(IPC::Message::Sender* sender) { sender_ = sender; } |
| 17 | IPC::Message::Sender* sender() const { return sender_; } |
| 18 | |
| 19 | // AppCacheFrontend methods |
| 20 | virtual void OnCacheSelected(int host_id, int64 cache_id , |
| 21 | appcache::Status); |
| 22 | virtual void OnStatusChanged(const std::vector<int>& host_ids, |
| 23 | appcache::Status status); |
| 24 | virtual void OnEventRaised(const std::vector<int>& host_ids, |
| 25 | appcache::EventID event_id); |
| 26 | |
| 27 | private: |
| 28 | IPC::Message::Sender* sender_; |
| 29 | }; |
| 30 | |
| 31 | #endif // CHROME_COMMON_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ |