Re-subimission of https://codereview.chromium.org/1041213003/
[chromium-blink-merge.git] / content / browser / appcache / appcache_frontend_proxy.h
blob65d03ee8d2e63e24c25d281eafa7ce4464bbf6fe
1 // Copyright (c) 2012 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.
5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
8 #include <string>
9 #include <vector>
11 #include "content/common/appcache_interfaces.h"
12 #include "ipc/ipc_sender.h"
14 namespace content {
16 // Sends appcache related messages to a child process.
17 class AppCacheFrontendProxy : public AppCacheFrontend {
18 public:
19 explicit AppCacheFrontendProxy(IPC::Sender* sender);
21 // AppCacheFrontend methods
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;
38 private:
39 IPC::Sender* sender_;
42 } // namespace content
44 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_