| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // What BINDSTATUS_MIMETYPEAVAILABLE and Co. tells us. | 127 // What BINDSTATUS_MIMETYPEAVAILABLE and Co. tells us. |
| 128 ScopedBstr suggested_mime_type_; | 128 ScopedBstr suggested_mime_type_; |
| 129 // At least one of the following has been received: | 129 // At least one of the following has been received: |
| 130 // BINDSTATUS_MIMETYPEAVAILABLE, | 130 // BINDSTATUS_MIMETYPEAVAILABLE, |
| 131 // MIMESTATUS_VERIFIEDMIMETYPEAVAILABLE | 131 // MIMESTATUS_VERIFIEDMIMETYPEAVAILABLE |
| 132 // BINDSTATUS_SERVER_MIMETYPEAVAILABLE | 132 // BINDSTATUS_SERVER_MIMETYPEAVAILABLE |
| 133 bool has_suggested_mime_type_; | 133 bool has_suggested_mime_type_; |
| 134 // BINDSTATUS_SERVER_MIMETYPEAVAILABLE received, so we shall fire one. | 134 // BINDSTATUS_SERVER_MIMETYPEAVAILABLE received, so we shall fire one. |
| 135 bool has_server_mime_type_; | 135 bool has_server_mime_type_; |
| 136 | 136 |
| 137 // Did we received ReportData() | |
| 138 bool report_data_received_; | |
| 139 RendererType renderer_type_; | 137 RendererType renderer_type_; |
| 140 | 138 |
| 141 // Buffer for accumulated data including 1 extra for NULL-terminator | 139 // Buffer for accumulated data including 1 extra for NULL-terminator |
| 142 static const size_t kMaxContentSniffLength = 2 * 1024; | 140 static const size_t kMaxContentSniffLength = 2 * 1024; |
| 143 char buffer_[kMaxContentSniffLength + 1]; | 141 char buffer_[kMaxContentSniffLength + 1]; |
| 144 unsigned long buffer_size_; // NOLINT | 142 unsigned long buffer_size_; // NOLINT |
| 145 unsigned long buffer_pos_; // NOLINT | 143 unsigned long buffer_pos_; // NOLINT |
| 146 | 144 |
| 147 HRESULT FillBuffer(); | 145 HRESULT FillBuffer(); |
| 148 void SaveSuggestedMimeType(LPCWSTR status_text); | 146 void SaveSuggestedMimeType(LPCWSTR status_text); |
| 149 void FireSugestedMimeType(IInternetProtocolSink* delegate); | 147 void FireSugestedMimeType(IInternetProtocolSink* delegate); |
| 150 }; | 148 }; |
| 151 | 149 |
| 152 struct TransactionHooks { | 150 struct TransactionHooks { |
| 153 void InstallHooks(); | 151 void InstallHooks(); |
| 154 void RevertHooks(); | 152 void RevertHooks(); |
| 155 }; | 153 }; |
| 156 | 154 |
| 157 DECLSPEC_SELECTANY struct TransactionHooks g_trans_hooks; | 155 DECLSPEC_SELECTANY struct TransactionHooks g_trans_hooks; |
| 158 | 156 |
| 159 #endif // CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ | 157 #endif // CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ |
| 160 | 158 |
| OLD | NEW |