The macro used to be called FOR_EACH_CLASS and lived in WebKitDLL.cpp.
This way we will be able to use the macro in more places that care
about all WebKit's COM classes.
Reviewed by Ada.
* ForEachCoClass.h: Added.
* WebKit.vcproj/WebKit.vcproj: Copy ForEachCoClass.h to
WebKitOutputDir, and added it to the project.
* WebKitDLL.cpp: Updated for macro rename, and changed to #undef the
macros we pass to FOR_EACH_COCLASS after we're done with them.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27017
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-10-24 Adam Roben <aroben@apple.com>
+
+ Put FOR_EACH_COCLASS macro into its own file and export it
+
+ The macro used to be called FOR_EACH_CLASS and lived in WebKitDLL.cpp.
+ This way we will be able to use the macro in more places that care
+ about all WebKit's COM classes.
+
+ Reviewed by Ada.
+
+ * ForEachCoClass.h: Added.
+ * WebKit.vcproj/WebKit.vcproj: Copy ForEachCoClass.h to
+ WebKitOutputDir, and added it to the project.
+ * WebKitDLL.cpp: Updated for macro rename, and changed to #undef the
+ macros we pass to FOR_EACH_COCLASS after we're done with them.
+
2007-10-24 Ada Chan <adachan@apple.com>
<rdar://problem/5552221> REGRESSION(310A24-ToT): Shortcut key disable. (15604)
--- /dev/null
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ForEachCoClass_h
+#define ForEachCoClass_h
+
+#define FOR_EACH_COCLASS(macro) \
+ macro(CFDictionaryPropertyBag) \
+ macro(WebCache) \
+ macro(WebDebugProgram) \
+ macro(WebDownload) \
+ macro(WebError) \
+ macro(WebHistory) \
+ macro(WebHistoryItem) \
+ macro(WebIconDatabase) \
+ macro(WebJavaScriptCollector) \
+ macro(WebKitStatistics) \
+ macro(WebMutableURLRequest) \
+ macro(WebNotificationCenter) \
+ macro(WebPreferences) \
+ macro(WebScrollBar) \
+ macro(WebURLCredential) \
+ macro(WebURLProtectionSpace) \
+ macro(WebURLRequest) \
+ macro(WebURLResponse) \
+ macro(WebView) \
+ // end of macro
+
+#endif // !defined(ForEachCoClass_h)
/>\r
<Tool\r
Name="VCPostBuildEventTool"\r
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"\r
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"\r
/>\r
</Configuration>\r
<Configuration\r
/>\r
<Tool\r
Name="VCPostBuildEventTool"\r
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"\r
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"\r
/>\r
</Configuration>\r
<Configuration\r
/>\r
<Tool\r
Name="VCPostBuildEventTool"\r
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"\r
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebLocalizableStrings.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\WebKitGraphics.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ForEachCoClass.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(ProjectDir)\..\ProgIDMacros.h" "$(WebKitOutputDir)\include\WebKit"

xcopy /y /d "$(WebKitOutputDir)\include\WebCore\npfunctions.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npapi.h" "$(WebKitOutputDir)\include\WebKit"
xcopy /y /d "$(WebKitOutputDir)\include\JavaScriptCore\npruntime.h" "$(WebKitOutputDir)\include\WebKit"

mkdir 2>NUL "$(OutDir)\WebKit.resources"
xcopy /y /d "$(ProjectDir)..\$(ProjectName).resources\*" "$(OutDir)\$(ProjectName).resources"
mkdir 2>NUL "$(OutDir)\WebKit.resources\en.lproj"
xcopy /y /d "$(ProjectDir)..\English.lproj\Localizable.strings" "$(OutDir)\WebKit.resources\en.lproj\"
"\r
/>\r
</Configuration>\r
</Configurations>\r
RelativePath="..\DOMHTMLClasses.h"\r
>\r
</File>\r
+ <File\r
+ RelativePath="..\ForEachCoClass.h"\r
+ >\r
+ </File>\r
<File\r
RelativePath="..\HTTPHeaderPropertyBag.h"\r
>\r
#include "config.h"
#include "WebKitDLL.h"
+#include "ForEachCoClass.h"
#include "IWebURLResponse.h"
#include "ProgIDMacros.h"
#include "WebKit.h"
ULONG gClassCount;
HINSTANCE gInstance;
-#define FOR_EACH_CLASS(macro) \
- macro(CFDictionaryPropertyBag) \
- macro(WebCache) \
- macro(WebDebugProgram) \
- macro(WebDownload) \
- macro(WebError) \
- macro(WebHistory) \
- macro(WebHistoryItem) \
- macro(WebIconDatabase) \
- macro(WebJavaScriptCollector) \
- macro(WebKitStatistics) \
- macro(WebMutableURLRequest) \
- macro(WebNotificationCenter) \
- macro(WebPreferences) \
- macro(WebScrollBar) \
- macro(WebURLCredential) \
- macro(WebURLProtectionSpace) \
- macro(WebURLRequest) \
- macro(WebURLResponse) \
- macro(WebView)
-
#define CLSID_FOR_CLASS(cls) CLSID_##cls,
-
static CLSID gRegCLSIDs[] = {
- FOR_EACH_CLASS(CLSID_FOR_CLASS)
+ FOR_EACH_COCLASS(CLSID_FOR_CLASS)
};
+#undef CLSID_FOR_CLASS
void shutDownWebKit()
{
static const int gSlotsPerEntry = 12;
static LPCTSTR gRegTable[][3] = {
- FOR_EACH_CLASS(KEYS_FOR_CLASS)
+ FOR_EACH_COCLASS(KEYS_FOR_CLASS)
};
+#undef KEYS_FOR_CLASS
static void substituteGUID(LPTSTR str, const UUID* guid)
{