Commit 7525795e authored by weinig@apple.com's avatar weinig@apple.com

Move WKRetain and WKRelease overloaded functions out of WKRetainPtr

and into the files of the type they overload (eg, WKRetain(WKFrameRef 
moves to WKFrame.h)).

Reviewed by Anders Carlsson.

* UIProcess/API/C/WKBase.h:
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKFrame.h:
* UIProcess/API/C/WKFramePolicyListener.h:
* UIProcess/API/C/WKNavigationData.h:
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WKPageNamespace.h:
* UIProcess/API/C/WKPreferences.h:
* UIProcess/API/C/WKString.h:
* UIProcess/API/C/WKURL.h:
* UIProcess/API/cpp/WKRetainPtr.h:
* UIProcess/API/win/WKView.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e8ac5661
2010-06-11 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Move WKRetain and WKRelease overloaded functions out of WKRetainPtr
and into the files of the type they overload (eg, WKRetain(WKFrameRef
moves to WKFrame.h)).
* UIProcess/API/C/WKBase.h:
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKFrame.h:
* UIProcess/API/C/WKFramePolicyListener.h:
* UIProcess/API/C/WKNavigationData.h:
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WKPageNamespace.h:
* UIProcess/API/C/WKPreferences.h:
* UIProcess/API/C/WKString.h:
* UIProcess/API/C/WKURL.h:
* UIProcess/API/cpp/WKRetainPtr.h:
* UIProcess/API/win/WKView.h:
2010-06-10 John Sullivan <sullivan@apple.com>
Reviewed by Dan Bernstein.
......
......@@ -50,4 +50,14 @@ typedef struct OpaqueWKURLRef* WKURLRef;
#define WK_EXPORT
#endif
#ifdef __cplusplus
#define WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKType) \
inline void WKRetain(WKType##Ref p) { WKType##Retain(p); } \
inline void WKRelease(WKType##Ref p) { WKType##Release(p); } \
// end of macro
#else
#define WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKType)
#endif
#endif /* WKBase_h */
......@@ -50,4 +50,6 @@ WK_EXPORT void WKContextRelease(WKContextRef context);
}
#endif
WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKContext)
#endif /* WKContext_h */
......@@ -58,4 +58,6 @@ WK_EXPORT void WKFrameRelease(WKFrameRef frame);
}
#endif
WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKFrame)
#endif /* WKFrame_h */
......@@ -43,4 +43,6 @@ WK_EXPORT void WKFramePolicyListenerRelease(WKFramePolicyListenerRef policyListe
}
#endif
WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKFramePolicyListener)
#endif /* WKFramePolicyListener_h */
......@@ -42,4 +42,6 @@ WK_EXPORT void WKNavigationDataRelease(WKNavigationDataRef navigationData);
}
#endif
WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKNavigationData)
#endif /* WKNavigationData_h */
......@@ -26,7 +26,6 @@
#ifndef WKPage_h
#define WKPage_h
#include <CoreFoundation/CoreFoundation.h>
#include <WebKit2/WKBase.h>
#ifndef __cplusplus
......@@ -172,4 +171,6 @@ WK_EXPORT void WKPageRelease(WKPageRef page);
}
#endif
WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKPage)
#endif /* WKPage_h */
......@@ -43,4 +43,6 @@ WK_EXPORT void WKPageNamespaceRelease(WKPageNamespaceRef pageNamespace);
}
#endif
WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKPageNamespace)
#endif /* WKPageNamespace_h */
......@@ -51,4 +51,6 @@ WK_EXPORT void WKPreferencesRelease(WKPreferencesRef preferences);
}
#endif
WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKPreferences)
#endif /* WKPreferences_h */
......@@ -39,4 +39,6 @@ WK_EXPORT void WKStringRelease(WKStringRef string);
}
#endif
WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKString)
#endif /* WKString_h */
......@@ -39,4 +39,6 @@ WK_EXPORT void WKURLRelease(WKURLRef URL);
}
#endif
WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKURL)
#endif /* WKURL_h */
......@@ -26,31 +26,8 @@
#ifndef WKRetainPtr_h
#define WKRetainPtr_h
#include <WebKit2/WebKit2.h>
namespace WebKit {
// FIXME: Consider moving these to their respective headers instead of putting
// them all here.
#define DECLARE_RETAIN_RELEASE_OVERLOADS(WKType) \
inline void WKRetain(WKType##Ref p) { WKType##Retain(p); } \
inline void WKRelease(WKType##Ref p) { WKType##Release(p); } \
// end of macro
DECLARE_RETAIN_RELEASE_OVERLOADS(WKContext)
DECLARE_RETAIN_RELEASE_OVERLOADS(WKFrame)
DECLARE_RETAIN_RELEASE_OVERLOADS(WKFramePolicyListener)
DECLARE_RETAIN_RELEASE_OVERLOADS(WKPage)
DECLARE_RETAIN_RELEASE_OVERLOADS(WKPageNamespace)
DECLARE_RETAIN_RELEASE_OVERLOADS(WKPreferences)
DECLARE_RETAIN_RELEASE_OVERLOADS(WKString)
DECLARE_RETAIN_RELEASE_OVERLOADS(WKURL)
#if PLATFORM(WIN)
DECLARE_RETAIN_RELEASE_OVERLOADS(WKView)
#endif
#undef DECLARE_RETAIN_RELEASE_OVERLOADS
enum WKAdoptTag { AdoptWK };
template <typename T>
......
......@@ -50,4 +50,6 @@ WK_EXPORT void WKViewWindowAncestryDidChange(WKViewRef view);
}
#endif
WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKView)
#endif /* WKView_h */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment