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

Unified Diff: chrome_frame/protocol_sink_wrap.h

Issue 244002: This fixes a crash in IE8 with ChromeFrame when a new tab was created. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « chrome_frame/bho.cc ('k') | chrome_frame/protocol_sink_wrap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/protocol_sink_wrap.h
===================================================================
--- chrome_frame/protocol_sink_wrap.h (revision 27143)
+++ chrome_frame/protocol_sink_wrap.h (working copy)
@@ -17,6 +17,7 @@
#include "base/scoped_comptr_win.h"
#include "googleurl/src/gurl.h"
#include "chrome_frame/ie8_types.h"
+#include "chrome_frame/vtable_patch_manager.h"
// Typedefs for IInternetProtocol and related methods that we patch.
typedef HRESULT (STDMETHODCALLTYPE* InternetProtocol_Start_Fn)(
@@ -85,9 +86,13 @@
bool Initialize(IInternetProtocol* protocol,
IInternetProtocolSink* original_sink, const wchar_t* url);
- static bool PatchProtocolHandler(const wchar_t* dll,
- const CLSID& handler_clsid);
+ // VTable patches the IInternetProtocol and IIntenetProtocolEx interface.
+ // Returns true on success.
+ static bool PatchProtocolHandlers();
+ // Unpatches the IInternetProtocol and IInternetProtocolEx interfaces.
+ static void UnpatchProtocolHandlers();
+
// IInternetProtocol/Ex patches.
static HRESULT STDMETHODCALLTYPE OnStart(InternetProtocol_Start_Fn orig_start,
IInternetProtocol* protocol, LPCWSTR url,
@@ -183,6 +188,21 @@
return renderer_type_;
}
+ // Creates an instance of the specified protocol handler and returns the
+ // IInternetProtocol interface pointer.
+ // Returns S_OK on success.
+ static HRESULT CreateProtocolHandlerInstance(const CLSID& clsid,
+ IInternetProtocol** protocol);
+
+ // Helper function for patching the VTable of the IInternetProtocol
+ // interface. It instantiates the object identified by the protocol_clsid
+ // parameter and patches its VTable.
+ // Returns S_OK on success.
+ static HRESULT PatchProtocolMethods(
+ const CLSID& protocol_clsid,
+ vtable_patch::MethodPatchInfo* protocol_patch_info,
+ vtable_patch::MethodPatchInfo* protocol_ex_patch_info);
+
// WARNING: Don't use GURL variables here. Please see
// http://b/issue?id=2102171 for details.
@@ -202,7 +222,7 @@
HRESULT result_code_;
DWORD result_error_;
std::wstring result_text_;
- // For tracking re-entrency and preventing duplicate Read()s from
+ // For tracking re-entrency and preventing duplicate Read()s from
// distorting the outcome of ReportData.
int report_data_recursiveness_;
Property changes on: chrome_frame\protocol_sink_wrap.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome_frame/bho.cc ('k') | chrome_frame/protocol_sink_wrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698