Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Unified Diff: components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h

Issue 2063683002: Migrate components/data_reduction_proxy to Mojo interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trybots failure Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..9e1fe498c792bc0ebc98f7f954e83f3bcb6286c1
--- /dev/null
+++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_host_impl.h
@@ -0,0 +1,51 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
Anand Mistry (off Chromium) 2016/06/24 07:12:28 Ahem! Unless you've got a time machine I can borro
leonhsl(Using Gerrit) 2016/06/24 09:59:21 Ehh,, Done! Thank you ;-)
+// 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.h"
+
+namespace net {
+class HostPortPair;
+}
+
+namespace data_reduction_proxy {
+
+class DataReductionProxyConfig;
+
+class DataReductionProxyHostImpl : public mojom::DataReductionProxyHost,
+ public content::RenderProcessHostObserver {
+ public:
+ // |config| may be null.
+ DataReductionProxyHostImpl(DataReductionProxyConfig* config,
+ content::RenderProcessHost* host);
+
+ ~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 RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
+
+ private:
+ // Must outlive |this|. May be null.
+ DataReductionProxyConfig* config_;
+
+ mojo::Binding<mojom::DataReductionProxyHost> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(DataReductionProxyHostImpl);
+};
+
+} // namespace data_reduction_proxy
+
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_BROWSER_DATA_REDUCTION_PROXY_HOST_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698