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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 private: | 133 private: |
134 typedef std::map<IInternetProtocol*, ProtData*> ProtocolDataMap; | 134 typedef std::map<IInternetProtocol*, ProtData*> ProtocolDataMap; |
135 static ProtocolDataMap datamap_; | 135 static ProtocolDataMap datamap_; |
136 static Lock datamap_lock_; | 136 static base::Lock datamap_lock_; |
137 | 137 |
138 // Url we are retrieving. Used for RendererTypeForUrl() only. | 138 // Url we are retrieving. Used for RendererTypeForUrl() only. |
139 std::wstring url_; | 139 std::wstring url_; |
140 // HTTP "Referrer" header if we detect are going to switch. | 140 // 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. | 141 // We have to save and pass it to Chrome, so scripts can read it via DOM. |
142 std::string referrer_; | 142 std::string referrer_; |
143 | 143 |
144 // Our gate to IInternetProtocol::Read() | 144 // Our gate to IInternetProtocol::Read() |
145 IInternetProtocol* protocol_; | 145 IInternetProtocol* protocol_; |
146 InternetProtocol_Read_Fn read_fun_; | 146 InternetProtocol_Read_Fn read_fun_; |
(...skipping 23 matching lines...) Expand all Loading... |
170 }; | 170 }; |
171 | 171 |
172 struct TransactionHooks { | 172 struct TransactionHooks { |
173 void InstallHooks(); | 173 void InstallHooks(); |
174 void RevertHooks(); | 174 void RevertHooks(); |
175 }; | 175 }; |
176 | 176 |
177 DECLSPEC_SELECTANY struct TransactionHooks g_trans_hooks; | 177 DECLSPEC_SELECTANY struct TransactionHooks g_trans_hooks; |
178 | 178 |
179 #endif // CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ | 179 #endif // CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ |
OLD | NEW |