blob: 1c53ef05a7a5024436aefa9ae1c3567307bc6662 [file] [log] [blame]
[email protected]f7867172012-07-11 07:04:071// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]f430b5712009-08-21 21:46:312// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1eaa4f72011-02-24 23:37:355#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
6#define CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_
[email protected]f430b5712009-08-21 21:46:317
[email protected]ec5c1922010-07-28 03:14:378#include <string>
[email protected]f430b5712009-08-21 21:46:319#include <vector>
[email protected]0082d7e0d2010-02-27 14:34:1210
Nicholas Verne07e9c6452017-12-13 04:12:5511#include "content/common/appcache.mojom.h"
[email protected]98d6d4562014-06-25 20:57:5512#include "content/common/appcache_interfaces.h"
[email protected]f430b5712009-08-21 21:46:3113
[email protected]de551c62012-10-24 20:50:0814namespace content {
15
[email protected]f430b5712009-08-21 21:46:3116// Sends appcache related messages to a child process.
[email protected]98d6d4562014-06-25 20:57:5517class AppCacheFrontendProxy : public AppCacheFrontend {
[email protected]f430b5712009-08-21 21:46:3118 public:
Nicholas Verne07e9c6452017-12-13 04:12:5519 explicit AppCacheFrontendProxy(int process_id);
20 ~AppCacheFrontendProxy() override;
[email protected]f430b5712009-08-21 21:46:3121
22 // AppCacheFrontend methods
dchengc2282aa2014-10-21 12:07:5823 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 Iyengar2130d272017-09-01 18:21:1438 void OnSetSubresourceFactory(
39 int host_id,
John Abd-El-Malekb165dc52018-01-18 17:12:1840 network::mojom::URLLoaderFactoryPtr url_loader_factory) override;
[email protected]f430b5712009-08-21 21:46:3141
42 private:
Nicholas Verne07e9c6452017-12-13 04:12:5543 mojom::AppCacheFrontend* GetAppCacheFrontend();
44
45 const int process_id_;
46 mojom::AppCacheFrontendPtr app_cache_renderer_ptr_;
[email protected]f430b5712009-08-21 21:46:3147};
48
[email protected]de551c62012-10-24 20:50:0849} // namespace content
50
[email protected]1eaa4f72011-02-24 23:37:3551#endif // CONTENT_BROWSER_APPCACHE_APPCACHE_FRONTEND_PROXY_H_