| 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_UTILS_H_ | 5 #ifndef CHROME_FRAME_UTILS_H_ |
| 6 #define CHROME_FRAME_UTILS_H_ | 6 #define CHROME_FRAME_UTILS_H_ |
| 7 | 7 |
| 8 #include <shdeprecated.h> | 8 #include <shdeprecated.h> |
| 9 #include <urlmon.h> | 9 #include <urlmon.h> |
| 10 #include <wininet.h> | 10 #include <wininet.h> |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 bool IsTextHtmlMimeType(const wchar_t* mime_type); | 430 bool IsTextHtmlMimeType(const wchar_t* mime_type); |
| 431 | 431 |
| 432 // Returns true iff the clipboard format is text/html. | 432 // Returns true iff the clipboard format is text/html. |
| 433 bool IsTextHtmlClipFormat(CLIPFORMAT cf); | 433 bool IsTextHtmlClipFormat(CLIPFORMAT cf); |
| 434 | 434 |
| 435 // Returns the desired patch method (moniker, http_equiv, protocol sink). | 435 // Returns the desired patch method (moniker, http_equiv, protocol sink). |
| 436 // Defaults to moniker patch. | 436 // Defaults to moniker patch. |
| 437 ProtocolPatchMethod GetPatchMethod(); | 437 ProtocolPatchMethod GetPatchMethod(); |
| 438 | 438 |
| 439 // Returns true if the IMoniker patch is enabled. | 439 // Returns true if the IMoniker patch is enabled. |
| 440 bool MonikerPatchEnabled(); | 440 bool IsIBrowserServicePatchEnabled(); |
| 441 | 441 |
| 442 // STL helper class that implements a functor to delete objects. | 442 // STL helper class that implements a functor to delete objects. |
| 443 // E.g: std::for_each(v.begin(), v.end(), utils::DeleteObject()); | 443 // E.g: std::for_each(v.begin(), v.end(), utils::DeleteObject()); |
| 444 namespace utils { | 444 namespace utils { |
| 445 class DeleteObject { | 445 class DeleteObject { |
| 446 public: | 446 public: |
| 447 template <typename T> | 447 template <typename T> |
| 448 void operator()(T* obj) { | 448 void operator()(T* obj) { |
| 449 delete obj; | 449 delete obj; |
| 450 } | 450 } |
| 451 }; | 451 }; |
| 452 } | 452 } |
| 453 | 453 |
| 454 // Convert various protocol flags to text representation. Used for logging. |
| 455 std::string BindStatus2Str(ULONG bind_status); |
| 456 std::string PiFlags2Str(DWORD flags); |
| 457 std::string Bscf2Str(DWORD flags); |
| 458 |
| 454 #endif // CHROME_FRAME_UTILS_H_ | 459 #endif // CHROME_FRAME_UTILS_H_ |
| OLD | NEW |