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 CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "ipc/ipc_message.h" | 12 #include "ipc/ipc_sender.h" |
13 #include "webkit/appcache/appcache_interfaces.h" | 13 #include "webkit/appcache/appcache_interfaces.h" |
14 | 14 |
15 // Sends appcache related messages to a child process. | 15 // Sends appcache related messages to a child process. |
16 class AppCacheFrontendProxy : public appcache::AppCacheFrontend { | 16 class AppCacheFrontendProxy : public appcache::AppCacheFrontend { |
17 public: | 17 public: |
18 explicit AppCacheFrontendProxy(IPC::Message::Sender* sender); | 18 explicit AppCacheFrontendProxy(IPC::Sender* sender); |
19 | 19 |
20 // AppCacheFrontend methods | 20 // AppCacheFrontend methods |
21 virtual void OnCacheSelected(int host_id, | 21 virtual void OnCacheSelected(int host_id, |
22 const appcache::AppCacheInfo& info) OVERRIDE; | 22 const appcache::AppCacheInfo& info) OVERRIDE; |
23 virtual void OnStatusChanged(const std::vector<int>& host_ids, | 23 virtual void OnStatusChanged(const std::vector<int>& host_ids, |
24 appcache::Status status) OVERRIDE; | 24 appcache::Status status) OVERRIDE; |
25 virtual void OnEventRaised(const std::vector<int>& host_ids, | 25 virtual void OnEventRaised(const std::vector<int>& host_ids, |
26 appcache::EventID event_id) OVERRIDE; | 26 appcache::EventID event_id) OVERRIDE; |
27 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, | 27 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, |
28 const GURL& url, | 28 const GURL& url, |
29 int num_total, int num_complete) OVERRIDE; | 29 int num_total, int num_complete) OVERRIDE; |
30 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, | 30 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, |
31 const std::string& message) OVERRIDE; | 31 const std::string& message) OVERRIDE; |
32 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, | 32 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, |
33 const std::string& message) OVERRIDE; | 33 const std::string& message) OVERRIDE; |
34 virtual void OnContentBlocked(int host_id, | 34 virtual void OnContentBlocked(int host_id, |
35 const GURL& manifest_url) OVERRIDE; | 35 const GURL& manifest_url) OVERRIDE; |
36 | 36 |
37 private: | 37 private: |
38 IPC::Message::Sender* sender_; | 38 IPC::Sender* sender_; |
39 }; | 39 }; |
40 | 40 |
41 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ | 41 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_ |
OLD | NEW |