| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 DWORD cookie) { | 343 DWORD cookie) { |
| 344 T* instance = reinterpret_cast<T*>(obj); | 344 T* instance = reinterpret_cast<T*>(obj); |
| 345 HRESULT hr = E_NOINTERFACE; | 345 HRESULT hr = E_NOINTERFACE; |
| 346 IUnknown* delegate = instance ? instance->delegate() : NULL; | 346 IUnknown* delegate = instance ? instance->delegate() : NULL; |
| 347 if (delegate) { | 347 if (delegate) { |
| 348 hr = delegate->QueryInterface(iid, ret); | 348 hr = delegate->QueryInterface(iid, ret); |
| 349 #if !defined(NDEBUG) | 349 #if !defined(NDEBUG) |
| 350 if (SUCCEEDED(hr)) { | 350 if (SUCCEEDED(hr)) { |
| 351 wchar_t iid_string[64] = {0}; | 351 wchar_t iid_string[64] = {0}; |
| 352 StringFromGUID2(iid, iid_string, arraysize(iid_string)); | 352 StringFromGUID2(iid, iid_string, arraysize(iid_string)); |
| 353 DLOG(INFO) << __FUNCTION__ << " Giving out wrapped interface: " | 353 DVLOG(1) << __FUNCTION__ << " Giving out wrapped interface: " |
| 354 << iid_string; | 354 << iid_string; |
| 355 } | 355 } |
| 356 #endif | 356 #endif |
| 357 } | 357 } |
| 358 | 358 |
| 359 return hr; | 359 return hr; |
| 360 } | 360 } |
| 361 | 361 |
| 362 // See COM_INTERFACE_ENTRY_IF_DELEGATE_SUPPORTS below for details. | 362 // See COM_INTERFACE_ENTRY_IF_DELEGATE_SUPPORTS below for details. |
| 363 template <class T> | 363 template <class T> |
| 364 STDMETHODIMP QueryInterfaceIfDelegateSupports(void* obj, REFIID iid, | 364 STDMETHODIMP QueryInterfaceIfDelegateSupports(void* obj, REFIID iid, |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 // Helper function to spin a message loop and dispatch messages while waiting | 590 // Helper function to spin a message loop and dispatch messages while waiting |
| 591 // for a handle to be signaled. | 591 // for a handle to be signaled. |
| 592 void WaitWithMessageLoop(HANDLE* handles, int count, DWORD timeout); | 592 void WaitWithMessageLoop(HANDLE* handles, int count, DWORD timeout); |
| 593 | 593 |
| 594 // Enumerates values in a key and adds them to an array. | 594 // Enumerates values in a key and adds them to an array. |
| 595 // The names of the values are not returned. | 595 // The names of the values are not returned. |
| 596 void EnumerateKeyValues(HKEY parent_key, const wchar_t* sub_key_name, | 596 void EnumerateKeyValues(HKEY parent_key, const wchar_t* sub_key_name, |
| 597 std::vector<std::wstring>* values); | 597 std::vector<std::wstring>* values); |
| 598 | 598 |
| 599 #endif // CHROME_FRAME_UTILS_H_ | 599 #endif // CHROME_FRAME_UTILS_H_ |
| OLD | NEW |