Index: components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h |
diff --git a/components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h b/components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..778aaa254976b9392054fda5177227d7f21e0713 |
--- /dev/null |
+++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h |
@@ -0,0 +1,54 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_BROWSER_DATA_REDUCTION_PROXY_HOST_IMPL_H_ |
+#define COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_BROWSER_DATA_REDUCTION_PROXY_HOST_IMPL_H_ |
+ |
+#include "base/macros.h" |
+#include "components/data_reduction_proxy/content/common/data_reduction_proxy.mojom.h" |
+#include "content/public/browser/render_process_host_observer.h" |
+#include "mojo/public/cpp/bindings/binding_set.h" |
+ |
+namespace net { |
+class HostPortPair; |
+} |
+ |
+namespace data_reduction_proxy { |
+ |
+class DataReductionProxyConfig; |
+class DataReductionProxySettings; |
+ |
+class DataReductionProxyHostImpl : public mojom::DataReductionProxyHost, |
+ public content::RenderProcessHostObserver { |
+ public: |
+ // |config| may be null. |
tbansal1
2016/07/13 17:35:18
Did you mean |settings|?
leonhsl(Using Gerrit)
2016/07/14 14:54:53
Done.
|
+ DataReductionProxyHostImpl(DataReductionProxySettings* settings, |
+ content::RenderProcessHost* host); |
tbansal1
2016/07/13 17:35:18
Forward declare RenderProcessHost.
leonhsl(Using Gerrit)
2016/07/14 14:54:53
Done.
|
+ |
+ ~DataReductionProxyHostImpl() override; |
+ |
+ void BindRequest(mojom::DataReductionProxyHostRequest request); |
+ |
+ // mojom::DataReductionProxyHost methods: |
+ void IsDataReductionProxy( |
+ const net::HostPortPair& proxy_server, |
+ const IsDataReductionProxyCallback& callback) override; |
+ |
+ // content::RenderProcessHostObserver methods: |
+ void RenderProcessExited(content::RenderProcessHost* host, |
+ base::TerminationStatus status, |
+ int exit_code) override; |
+ |
+ private: |
+ // Must outlive |this|. May be null. |
+ DataReductionProxyConfig* config_; |
+ |
+ mojo::BindingSet<mojom::DataReductionProxyHost> bindings_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DataReductionProxyHostImpl); |
+}; |
+ |
+} // namespace data_reduction_proxy |
+ |
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_BROWSER_DATA_REDUCTION_PROXY_HOST_IMPL_H_ |