| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_FRAME_URLMON_URL_REQUEST_PRIVATE_H_ | 5 #ifndef CHROME_FRAME_URLMON_URL_REQUEST_PRIVATE_H_ |
| 6 #define CHROME_FRAME_URLMON_URL_REQUEST_PRIVATE_H_ | 6 #define CHROME_FRAME_URLMON_URL_REQUEST_PRIVATE_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlcom.h> | 9 #include <atlcom.h> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 virtual bool Read(int bytes_to_read); | 32 virtual bool Read(int bytes_to_read); |
| 33 | 33 |
| 34 // Special function needed by ActiveDocument::Load() | 34 // Special function needed by ActiveDocument::Load() |
| 35 HRESULT InitPending(const GURL& url, IMoniker* moniker, IBindCtx* bind_ctx, | 35 HRESULT InitPending(const GURL& url, IMoniker* moniker, IBindCtx* bind_ctx, |
| 36 bool enable_frame_busting, bool privileged_mode, | 36 bool enable_frame_busting, bool privileged_mode, |
| 37 HWND notification_window, IStream* cache); | 37 HWND notification_window, IStream* cache); |
| 38 | 38 |
| 39 // Used from "DownloadRequestInHost". | 39 // Used from "DownloadRequestInHost". |
| 40 // Callback will be invoked either right away (if operation is finished) or | 40 // Callback will be invoked either right away (if operation is finished) or |
| 41 // from inside ::OnStopBinding() when it is safe to reuse the bind_context. | 41 // from inside ::OnStopBinding() when it is safe to reuse the bind_context. |
| 42 typedef Callback4<IMoniker*, IBindCtx*, IStream*, const char*>::Type | 42 typedef base::Callback<void(IMoniker*, IBindCtx*, IStream*, const char*)> |
| 43 TerminateBindCallback; | 43 TerminateBindCallback; |
| 44 void TerminateBind(TerminateBindCallback* callback); | 44 void TerminateBind(const TerminateBindCallback& callback); |
| 45 | 45 |
| 46 // Parent Window for UrlMon error dialogs | 46 // Parent Window for UrlMon error dialogs |
| 47 void set_parent_window(HWND parent_window) { | 47 void set_parent_window(HWND parent_window) { |
| 48 parent_window_ = parent_window; | 48 parent_window_ = parent_window; |
| 49 } | 49 } |
| 50 | 50 |
| 51 // This function passes information on whether ChromeFrame is running in | 51 // This function passes information on whether ChromeFrame is running in |
| 52 // privileged mode. | 52 // privileged mode. |
| 53 void set_privileged_mode(bool privileged_mode) { | 53 void set_privileged_mode(bool privileged_mode) { |
| 54 privileged_mode_ = privileged_mode; | 54 privileged_mode_ = privileged_mode; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 base::win::ScopedComPtr<IStream> pending_data_; | 239 base::win::ScopedComPtr<IStream> pending_data_; |
| 240 | 240 |
| 241 size_t pending_read_size_; | 241 size_t pending_read_size_; |
| 242 base::PlatformThreadId thread_; | 242 base::PlatformThreadId thread_; |
| 243 HWND parent_window_; | 243 HWND parent_window_; |
| 244 bool headers_received_; | 244 bool headers_received_; |
| 245 int calling_delegate_; // re-entrancy protection. | 245 int calling_delegate_; // re-entrancy protection. |
| 246 // Set to true if the ChromeFrame instance is running in privileged mode. | 246 // Set to true if the ChromeFrame instance is running in privileged mode. |
| 247 bool privileged_mode_; | 247 bool privileged_mode_; |
| 248 bool pending_; | 248 bool pending_; |
| 249 scoped_ptr<TerminateBindCallback> terminate_bind_callback_; | 249 TerminateBindCallback terminate_bind_callback_; |
| 250 std::string response_headers_; | 250 std::string response_headers_; |
| 251 // Defaults to true and indicates whether we want to keep the original | 251 // Defaults to true and indicates whether we want to keep the original |
| 252 // transaction alive when we receive the last data notification from | 252 // transaction alive when we receive the last data notification from |
| 253 // urlmon. | 253 // urlmon. |
| 254 bool is_expecting_download_; | 254 bool is_expecting_download_; |
| 255 // Set to true if the Urlmon transaction object needs to be cleaned up | 255 // Set to true if the Urlmon transaction object needs to be cleaned up |
| 256 // when this object is destroyed. Happens if we return | 256 // when this object is destroyed. Happens if we return |
| 257 // INET_E_TERMINATE_BIND from OnDataAvailable in the last data notification. | 257 // INET_E_TERMINATE_BIND from OnDataAvailable in the last data notification. |
| 258 bool cleanup_transaction_; | 258 bool cleanup_transaction_; |
| 259 // Copy of the request headers. | 259 // Copy of the request headers. |
| 260 std::string request_headers_; | 260 std::string request_headers_; |
| 261 | 261 |
| 262 DISALLOW_COPY_AND_ASSIGN(UrlmonUrlRequest); | 262 DISALLOW_COPY_AND_ASSIGN(UrlmonUrlRequest); |
| 263 }; | 263 }; |
| 264 | 264 |
| 265 #endif // CHROME_FRAME_URLMON_URL_REQUEST_PRIVATE_H_ | 265 #endif // CHROME_FRAME_URLMON_URL_REQUEST_PRIVATE_H_ |
| OLD | NEW |