// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_FRAME_UTILS_H_ #define CHROME_FRAME_UTILS_H_ #include #include #include #include #include #include #include "base/basictypes.h" #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/threading/thread.h" #include "base/win/scoped_comptr.h" #include "googleurl/src/gurl.h" #include "ui/gfx/rect.h" class FilePath; interface IBrowserService; interface IWebBrowser2; struct ContextMenuModel; // utils.h : Various utility functions and classes extern const wchar_t kChromeContentPrefix[]; extern const char kGCFProtocol[]; extern const wchar_t kChromeProtocolPrefix[]; extern const wchar_t kChromeFrameHeadlessMode[]; extern const wchar_t kChromeFrameAccessibleMode[]; extern const wchar_t kChromeFrameUnpinnedMode[]; extern const wchar_t kAllowUnsafeURLs[]; extern const wchar_t kEnableBuggyBhoIntercept[]; extern const wchar_t kChromeMimeType[]; extern const wchar_t kChromeFrameAttachTabPattern[]; extern const wchar_t kChromeFrameConfigKey[]; extern const wchar_t kRenderInGCFUrlList[]; extern const wchar_t kRenderInHostUrlList[]; extern const wchar_t kEnableGCFRendererByDefault[]; extern const wchar_t kIexploreProfileName[]; extern const wchar_t kRundllProfileName[]; // This function is very similar to the AtlRegisterTypeLib function except // that it takes a parameter that specifies whether to register the typelib // for the current user only or on a machine-wide basis // Refer to the MSDN documentation for AtlRegisterTypeLib for a description of // the arguments HRESULT UtilRegisterTypeLib(HINSTANCE tlb_instance, LPCOLESTR index, bool for_current_user_only); // This function is very similar to the AtlUnRegisterTypeLib function except // that it takes a parameter that specifies whether to unregister the typelib // for the current user only or on a machine-wide basis // Refer to the MSDN documentation for AtlUnRegisterTypeLib for a description // of the arguments HRESULT UtilUnRegisterTypeLib(HINSTANCE tlb_instance, LPCOLESTR index, bool for_current_user_only); HRESULT UtilRegisterTypeLib(LPCWSTR typelib_path, bool for_current_user_only); HRESULT UtilUnRegisterTypeLib(LPCWSTR typelib_path, bool for_current_user_only); HRESULT UtilRegisterTypeLib(ITypeLib* typelib, LPCWSTR typelib_path, LPCWSTR help_dir, bool for_current_user_only); HRESULT UtilUnRegisterTypeLib(ITypeLib* typelib, bool for_current_user_only); // Clears a marker that causes legacy NPAPI registration to persist across // updates. Returns false if the marker could not be removed. bool UtilRemovePersistentNPAPIMarker(); // Given an HTML fragment, this function looks for the // tag and extracts the value of the // "content" attribute // This method will currently return a false positive if the tag appears // inside a string in a