OLD | NEW |
1 // Copyright (c) 2009 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_H_ | 5 #ifndef CHROME_FRAME_URLMON_URL_REQUEST_H_ |
6 #define CHROME_FRAME_URLMON_URL_REQUEST_H_ | 6 #define CHROME_FRAME_URLMON_URL_REQUEST_H_ |
7 | 7 |
8 #include <urlmon.h> | 8 #include <urlmon.h> |
9 #include <atlbase.h> | 9 #include <atlbase.h> |
10 #include <atlcom.h> | 10 #include <atlcom.h> |
11 #include <map> | 11 #include <map> |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 virtual void GetCookiesForUrl(const GURL& url, int cookie_id); | 90 virtual void GetCookiesForUrl(const GURL& url, int cookie_id); |
91 virtual void SetCookiesForUrl(const GURL& url, const std::string& cookie); | 91 virtual void SetCookiesForUrl(const GURL& url, const std::string& cookie); |
92 | 92 |
93 // PluginUrlRequestDelegate implementation | 93 // PluginUrlRequestDelegate implementation |
94 virtual void OnResponseStarted(int request_id, const char* mime_type, | 94 virtual void OnResponseStarted(int request_id, const char* mime_type, |
95 const char* headers, int size, | 95 const char* headers, int size, |
96 base::Time last_modified, | 96 base::Time last_modified, |
97 const std::string& redirect_url, | 97 const std::string& redirect_url, |
98 int redirect_status); | 98 int redirect_status); |
99 virtual void OnReadComplete(int request_id, const std::string& data); | 99 virtual void OnReadComplete(int request_id, const std::string& data); |
100 virtual void OnResponseEnd(int request_id, const URLRequestStatus& status); | 100 virtual void OnResponseEnd(int request_id, |
| 101 const net::URLRequestStatus& status); |
101 virtual void OnCookiesRetrieved(bool success, const GURL& url, | 102 virtual void OnCookiesRetrieved(bool success, const GURL& url, |
102 const std::string& cookie_string, | 103 const std::string& cookie_string, |
103 int cookie_id); | 104 int cookie_id); |
104 | 105 |
105 // This method is passed as a callback to UrlmonUrlRequest::TerminateBind. | 106 // This method is passed as a callback to UrlmonUrlRequest::TerminateBind. |
106 // We simply forward moniker and bind_ctx to host ActiveX/ActiveDocument, | 107 // We simply forward moniker and bind_ctx to host ActiveX/ActiveDocument, |
107 // so it may start NavigateWithBindContext. | 108 // so it may start NavigateWithBindContext. |
108 void BindTerminated(IMoniker* moniker, IBindCtx* bind_ctx); | 109 void BindTerminated(IMoniker* moniker, IBindCtx* bind_ctx); |
109 | 110 |
110 // Map for (request_id <-> UrlmonUrlRequest) | 111 // Map for (request_id <-> UrlmonUrlRequest) |
111 typedef std::map<int, scoped_refptr<UrlmonUrlRequest> > RequestMap; | 112 typedef std::map<int, scoped_refptr<UrlmonUrlRequest> > RequestMap; |
112 RequestMap request_map_; | 113 RequestMap request_map_; |
113 scoped_refptr<UrlmonUrlRequest> LookupRequest(int request_id); | 114 scoped_refptr<UrlmonUrlRequest> LookupRequest(int request_id); |
114 scoped_refptr<UrlmonUrlRequest> pending_request_; | 115 scoped_refptr<UrlmonUrlRequest> pending_request_; |
115 | 116 |
116 bool stopping_; | 117 bool stopping_; |
117 int calling_delegate_; // re-entrancy protection (debug only check) | 118 int calling_delegate_; // re-entrancy protection (debug only check) |
118 | 119 |
119 PrivacyInfo privacy_info_; | 120 PrivacyInfo privacy_info_; |
120 // The window to be used to fire notifications on. | 121 // The window to be used to fire notifications on. |
121 HWND notification_window_; | 122 HWND notification_window_; |
122 // Set to true if the ChromeFrame instance is running in privileged mode. | 123 // Set to true if the ChromeFrame instance is running in privileged mode. |
123 bool privileged_mode_; | 124 bool privileged_mode_; |
124 // A pointer to the containing object. We maintain a weak reference to avoid | 125 // A pointer to the containing object. We maintain a weak reference to avoid |
125 // lifetime issues. | 126 // lifetime issues. |
126 IUnknown* container_; | 127 IUnknown* container_; |
127 }; | 128 }; |
128 | 129 |
129 #endif // CHROME_FRAME_URLMON_URL_REQUEST_H_ | 130 #endif // CHROME_FRAME_URLMON_URL_REQUEST_H_ |
OLD | NEW |