Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginWbPassThrough.h

Issue 29331590: Issue #1484 - Make PassthroughAPP a pass-through again (Closed)
Patch Set: rebase only Created Dec. 22, 2015, 2:28 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginMimeFilterClient.cpp ('k') | src/plugin/PluginWbPassThrough.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginWbPassThrough.h
===================================================================
--- a/src/plugin/PluginWbPassThrough.h
+++ b/src/plugin/PluginWbPassThrough.h
@@ -84,20 +84,42 @@
/* [in] */ PROTOCOLDATA *pProtocolData);
};
-class WBPassthru;
-typedef PassthroughAPP::CustomSinkStartPolicy<WBPassthru, WBPassthruSink> WBStartPolicy;
+class WbPassthroughProtocol;
-class WBPassthru : public PassthroughAPP::CInternetProtocol<WBStartPolicy>
+class WbPassthroughSinkStartPolicy
+ : public PassthroughAPP::CustomSinkStartPolicy<WbPassthroughProtocol, WBPassthruSink>
{
- typedef PassthroughAPP::CInternetProtocol<WBStartPolicy> BaseClass;
+ typedef PassthroughAPP::CustomSinkStartPolicy<WbPassthroughProtocol, WBPassthruSink> BaseClass;
public:
- WBPassthru();
- // IInternetProtocolRoot
+ HRESULT OnStart(LPCWSTR szUrl,
+ IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
+ DWORD grfPI, HANDLE_PTR dwReserved,
+ IInternetProtocol* pTargetProtocol);
+};
+
+/**
+ * Implementation of "Protocol" interfaces
+ */
+class WbPassthroughProtocol
+ : public PassthroughAPP::CInternetProtocol<WbPassthroughSinkStartPolicy>
+{
+ typedef PassthroughAPP::CInternetProtocol<WbPassthroughSinkStartPolicy> BaseClass;
+public:
+ WbPassthroughProtocol()
+ : m_shouldSupplyCustomContent(false)
+ {
+ }
+
+ // derived from IInternetProtocolRoot
STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink,
IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) override;
- // IInternetProtocol
+ // derived from IInternetProtocol
STDMETHODIMP Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULONG *pcbRead) override;
bool m_shouldSupplyCustomContent;
};
+
+typedef PassthroughAPP::CMetaFactory<PassthroughAPP::CComClassFactoryProtocol, WbPassthroughProtocol> MetaFactory;
+
+
« no previous file with comments | « src/plugin/PluginMimeFilterClient.cpp ('k') | src/plugin/PluginWbPassThrough.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld