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

Unified Diff: src/plugin/PluginWbPassThrough.h

Issue 6299667012780032: Issues #696,1231,1264,1265 - Improve handling in PassthroughApp (Closed)
Patch Set: rebase Created Oct. 17, 2014, 12:51 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/PluginTabBase.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
@@ -1,5 +1,5 @@
#pragma once
-
+#include <cstdint>
#include "ProtocolCF.h"
#include "ProtocolImpl.h"
#define IE_MAX_URL_LENGTH 2048
@@ -11,14 +11,17 @@
typedef PassthroughAPP::CInternetProtocolSinkWithSP<WBPassthruSink, CComMultiThreadModel> BaseClass;
public:
+ WBPassthruSink();
- bool m_shouldBlock;
- bool m_lastDataReported;
+ uint64_t m_currentPositionOfSentPage;
CComPtr<IInternetProtocol> m_pTargetProtocol;
+ int m_contentType;
+ std::wstring m_boundDomain;
+ bool m_blockedInTransaction;
- int GetContentTypeFromMimeType(CString mimeType);
- int GetContentTypeFromURL(CString src);
- int GetContentType(CString mimeType, std::wstring domain, CString src);
+ int GetContentTypeFromMimeType(const CString& mimeType);
+ int GetContentTypeFromURL(const CString& src);
+ int GetContentType(const CString& mimeType, const std::wstring& domain, const CString& src);
public:
BEGIN_COM_MAP(WBPassthruSink)
COM_INTERFACE_ENTRY(IHttpNegotiate)
@@ -43,13 +46,18 @@
HRESULT OnStart(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink,
IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved,
- IInternetProtocol* pTargetProtocol);
- HRESULT Read(void *pv, ULONG cb, ULONG* pcbRead);
+ IInternetProtocol* pTargetProtocol, bool& handled);
+ HRESULT OnRead(void *pv, ULONG cb, ULONG* pcbRead);
STDMETHODIMP ReportProgress(
/* [in] */ ULONG ulStatusCode,
/* [in] */ LPCWSTR szStatusText);
+ STDMETHODIMP ReportResult(
+ /* [in] */ HRESULT hrResult,
+ /* [in] */ DWORD dwError,
+ /* [in] */ LPCWSTR szResult);
+
STDMETHODIMP Switch(
/* [in] */ PROTOCOLDATA *pProtocolData);
};
@@ -59,11 +67,19 @@
class WBPassthru : public PassthroughAPP::CInternetProtocol<WBStartPolicy>
{
+ typedef PassthroughAPP::CInternetProtocol<WBStartPolicy> BaseClass;
public:
+ WBPassthru();
// IInternetProtocolRoot
STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink,
- IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved);
+ IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) override;
//IInternetProtocol
- STDMETHODIMP Read( /* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULONG *pcbRead);
+ STDMETHODIMP Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULONG *pcbRead) override;
+
+ STDMETHODIMP LockRequest(/* [in] */ DWORD dwOptions) override;
+ STDMETHODIMP UnlockRequest() override;
+
+ bool m_shouldSupplyCustomContent;
+ bool m_hasOriginalStartCalled;
};
« no previous file with comments | « src/plugin/PluginTabBase.cpp ('k') | src/plugin/PluginWbPassThrough.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld