From 5cec0eb314bb4936e29d9138d259a4706aeacf4f Mon Sep 17 00:00:00 2001 From: "stoyan@chromium.org" Date: Wed, 28 Apr 2010 21:00:54 +0000 Subject: Nicely steal moniker and bind context from the urlmon url request. BUG=42104 Review URL: http://codereview.chromium.org/1811001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45860 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/urlmon_url_request_private.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'chrome_frame/urlmon_url_request_private.h') diff --git a/chrome_frame/urlmon_url_request_private.h b/chrome_frame/urlmon_url_request_private.h index ad7aa5a..f8c3561 100644 --- a/chrome_frame/urlmon_url_request_private.h +++ b/chrome_frame/urlmon_url_request_private.h @@ -36,7 +36,10 @@ class UrlmonUrlRequest HWND notification_window, IStream* cache); // Used from "DownloadRequestInHost". - void StealMoniker(IMoniker** moniker, IBindCtx** bctx); + // Callback will be invoked either right away (if operation is finished) or + // from inside ::OnStopBinding() when it is safe to reuse the bind_context. + typedef Callback2::Type TerminateBindCallback; + void TerminateBind(TerminateBindCallback* callback); // Parent Window for UrlMon error dialogs void set_parent_window(HWND parent_window) { @@ -110,6 +113,10 @@ class UrlmonUrlRequest return pending_; } + bool terminate_requested() const { + return terminate_bind_callback_.get() != NULL; + } + std::string response_headers() { return response_headers_; } @@ -271,6 +278,7 @@ class UrlmonUrlRequest // Set to true if the ChromeFrame instance is running in privileged mode. bool privileged_mode_; bool pending_; + scoped_ptr terminate_bind_callback_; std::string response_headers_; DISALLOW_COPY_AND_ASSIGN(UrlmonUrlRequest); }; -- cgit v1.1