// Copyright (c) 2010 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/synchronization/lock.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; // 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 kEnableFirefoxPrivilegeMode[]; 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); // Utility function to tell if the NPAPI plugin is registered. bool UtilIsNPAPIPluginRegistered(); // Sets or clears a marker that causes NPAPI registration to persist across // updates. The marker is added if set is true and is deleted otherwise. bool UtilChangePersistentNPAPIMarker(bool set); // Returns true if the persistent NPAPI marker is set, false otherwise. bool UtilIsPersistentNPAPIMarkerSet(); // 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