| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 UNDETERMINED, | 161 UNDETERMINED, |
| 162 CHROME, | 162 CHROME, |
| 163 OTHER | 163 OTHER |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 typedef std::map<IInternetProtocol*, ProtocolSinkWrap*> ProtocolSinkMap; | 166 typedef std::map<IInternetProtocol*, ProtocolSinkWrap*> ProtocolSinkMap; |
| 167 static const int kMaxContentSniffLength = 1024; | 167 static const int kMaxContentSniffLength = 1024; |
| 168 | 168 |
| 169 static scoped_refptr<ProtocolSinkWrap> InstanceFromProtocol( | 169 static scoped_refptr<ProtocolSinkWrap> InstanceFromProtocol( |
| 170 IInternetProtocol* protocol); | 170 IInternetProtocol* protocol); |
| 171 static HRESULT WebBrowserFromProtocolSink(IInternetProtocolSink* sink, | |
| 172 IWebBrowser2** web_browser); | |
| 173 static ScopedComPtr<IInternetProtocolSink> MaybeWrapSink( | 171 static ScopedComPtr<IInternetProtocolSink> MaybeWrapSink( |
| 174 IInternetProtocol* protocol, IInternetProtocolSink* prot_sink, | 172 IInternetProtocol* protocol, IInternetProtocolSink* prot_sink, |
| 175 const wchar_t* url); | 173 const wchar_t* url); |
| 176 | 174 |
| 177 void DetermineRendererType(); | 175 void DetermineRendererType(); |
| 178 HRESULT OnReadImpl(void* buffer, ULONG size, ULONG* size_read, | 176 HRESULT OnReadImpl(void* buffer, ULONG size, ULONG* size_read, |
| 179 InternetProtocol_Read_Fn orig_read); | 177 InternetProtocol_Read_Fn orig_read); |
| 180 | 178 |
| 181 bool is_undetermined() const { | 179 bool is_undetermined() const { |
| 182 return (UNDETERMINED == renderer_type_); | 180 return (UNDETERMINED == renderer_type_); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // TODO(joshia): Replace with Lock | 226 // TODO(joshia): Replace with Lock |
| 229 static CComAutoCriticalSection sink_map_lock_; | 227 static CComAutoCriticalSection sink_map_lock_; |
| 230 | 228 |
| 231 std::wstring url_; | 229 std::wstring url_; |
| 232 | 230 |
| 233 private: | 231 private: |
| 234 DISALLOW_COPY_AND_ASSIGN(ProtocolSinkWrap); | 232 DISALLOW_COPY_AND_ASSIGN(ProtocolSinkWrap); |
| 235 }; | 233 }; |
| 236 | 234 |
| 237 #endif // CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ | 235 #endif // CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ |
| OLD | NEW |