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_PROTOCOL_SINK_WRAP_H_ | 5 #ifndef CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ |
6 #define CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ | 6 #define CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ |
7 | 7 |
8 #include <exdisp.h> | 8 #include <exdisp.h> |
9 #include <urlmon.h> | 9 #include <urlmon.h> |
10 #include <atlbase.h> | 10 #include <atlbase.h> |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 return referrer_; | 123 return referrer_; |
124 } | 124 } |
125 | 125 |
126 bool is_attach_external_tab_request() const { | 126 bool is_attach_external_tab_request() const { |
127 return read_fun_ == NULL; | 127 return read_fun_ == NULL; |
128 } | 128 } |
129 | 129 |
130 // Removes the mapping between the protocol and the ProtData. | 130 // Removes the mapping between the protocol and the ProtData. |
131 void Invalidate(); | 131 void Invalidate(); |
132 | 132 |
| 133 const std::wstring& url() const { |
| 134 return url_; |
| 135 } |
| 136 |
133 private: | 137 private: |
134 typedef std::map<IInternetProtocol*, ProtData*> ProtocolDataMap; | 138 typedef std::map<IInternetProtocol*, ProtData*> ProtocolDataMap; |
135 static ProtocolDataMap datamap_; | 139 static ProtocolDataMap datamap_; |
136 static base::Lock datamap_lock_; | 140 static base::Lock datamap_lock_; |
137 | 141 |
138 // Url we are retrieving. Used for RendererTypeForUrl() only. | 142 // Url we are retrieving. Used for RendererTypeForUrl() only. |
139 std::wstring url_; | 143 std::wstring url_; |
140 // HTTP "Referrer" header if we detect are going to switch. | 144 // HTTP "Referrer" header if we detect are going to switch. |
141 // We have to save and pass it to Chrome, so scripts can read it via DOM. | 145 // We have to save and pass it to Chrome, so scripts can read it via DOM. |
142 std::string referrer_; | 146 std::string referrer_; |
(...skipping 27 matching lines...) Expand all Loading... |
170 }; | 174 }; |
171 | 175 |
172 struct TransactionHooks { | 176 struct TransactionHooks { |
173 void InstallHooks(); | 177 void InstallHooks(); |
174 void RevertHooks(); | 178 void RevertHooks(); |
175 }; | 179 }; |
176 | 180 |
177 DECLSPEC_SELECTANY struct TransactionHooks g_trans_hooks; | 181 DECLSPEC_SELECTANY struct TransactionHooks g_trans_hooks; |
178 | 182 |
179 #endif // CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ | 183 #endif // CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ |
OLD | NEW |