From f781782dd67077478e117c61dca4ea5eefce3544 Mon Sep 17 00:00:00 2001 From: "slightlyoff@chromium.org" Date: Thu, 24 Sep 2009 05:11:58 +0000 Subject: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming in a separate CL. BUG=None TEST=None Review URL: http://codereview.chromium.org/218019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27042 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/utils.h | 227 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 chrome_frame/utils.h (limited to 'chrome_frame/utils.h') diff --git a/chrome_frame/utils.h b/chrome_frame/utils.h new file mode 100644 index 0000000..80b9a53 --- /dev/null +++ b/chrome_frame/utils.h @@ -0,0 +1,227 @@ +// Copyright (c) 2009 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 "base/basictypes.h" + +// utils.h : Various utility functions and classes + +extern const wchar_t kChromeContentPrefix[]; +extern const wchar_t kChromeProtocolPrefix[]; + +// 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); + +// 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