Title: [86688] trunk/Source/WebKit2
Revision
86688
Author
[email protected]
Date
2011-05-17 11:06:20 -0700 (Tue, 17 May 2011)

Log Message

Part 3 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess

Reviewed by Anders Carlsson.

Add CoreIPC stuff we'll need to marshall the SecItem calls to the UIProcess and back.

Teach ArgumentCodersCF about CFDateRef, SecKeychainItemRef, and generic CFTypeRefs:
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::typeFromCFTypeRef):
(CoreIPC::encode):
(CoreIPC::decode):
* Shared/cf/ArgumentCodersCF.h:

Serializable object that contains the query CFDictionaryRef and optionally the 
"attributesToMatch" CFDictionaryRef:
* Shared/mac/SecItemRequestData.cpp: Added.
(WebKit::SecItemRequestData::SecItemRequestData):
(WebKit::SecItemRequestData::encode):
(WebKit::SecItemRequestData::decode):
* Shared/mac/SecItemRequestData.h: Added.
(WebKit::SecItemRequestData::query):
(WebKit::SecItemRequestData::attributesToMatch):

Serializable object that returns an OSStatus and optionally a "result object" CFTypeRef:
* Shared/mac/SecItemResponseData.cpp: Added.
(WebKit::SecItemResponseData::SecItemResponseData):
(WebKit::SecItemResponseData::encode):
(WebKit::SecItemResponseData::decode):
* Shared/mac/SecItemResponseData.h: Added.
(WebKit::SecItemResponseData::resultObject):
(WebKit::SecItemResponseData::resultCode):

* WebKit2.xcodeproj/project.pbxproj:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (86687 => 86688)


--- trunk/Source/WebKit2/ChangeLog	2011-05-17 17:49:58 UTC (rev 86687)
+++ trunk/Source/WebKit2/ChangeLog	2011-05-17 18:06:20 UTC (rev 86688)
@@ -2,6 +2,43 @@
 
         Reviewed by Anders Carlsson.
 
+        Part 3 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
+        Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
+
+        Add CoreIPC stuff we'll need to marshall the SecItem calls to the UIProcess and back.
+
+        Teach ArgumentCodersCF about CFDateRef, SecKeychainItemRef, and generic CFTypeRefs:
+        * Shared/cf/ArgumentCodersCF.cpp:
+        (CoreIPC::typeFromCFTypeRef):
+        (CoreIPC::encode):
+        (CoreIPC::decode):
+        * Shared/cf/ArgumentCodersCF.h:
+
+        Serializable object that contains the query CFDictionaryRef and optionally the 
+        "attributesToMatch" CFDictionaryRef:
+        * Shared/mac/SecItemRequestData.cpp: Added.
+        (WebKit::SecItemRequestData::SecItemRequestData):
+        (WebKit::SecItemRequestData::encode):
+        (WebKit::SecItemRequestData::decode):
+        * Shared/mac/SecItemRequestData.h: Added.
+        (WebKit::SecItemRequestData::query):
+        (WebKit::SecItemRequestData::attributesToMatch):
+
+        Serializable object that returns an OSStatus and optionally a "result object" CFTypeRef:
+        * Shared/mac/SecItemResponseData.cpp: Added.
+        (WebKit::SecItemResponseData::SecItemResponseData):
+        (WebKit::SecItemResponseData::encode):
+        (WebKit::SecItemResponseData::decode):
+        * Shared/mac/SecItemResponseData.h: Added.
+        (WebKit::SecItemResponseData::resultObject):
+        (WebKit::SecItemResponseData::resultCode):
+
+        * WebKit2.xcodeproj/project.pbxproj:
+
+2011-05-17  Brady Eidson  <[email protected]>
+
+        Reviewed by Anders Carlsson.
+
         Part 2 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
         Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
 

Modified: trunk/Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp (86687 => 86688)


--- trunk/Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp	2011-05-17 17:49:58 UTC (rev 86687)
+++ trunk/Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp	2011-05-17 18:06:20 UTC (rev 86688)
@@ -43,6 +43,7 @@
     CFArray,
     CFBoolean,
     CFData,
+    CFDate,
     CFDictionary,
     CFNull,
     CFNumber,
@@ -50,6 +51,7 @@
     CFURL,
 #if PLATFORM(MAC)
     SecCertificate,
+    SecKeychainItem,
 #endif
     Null,
     Unknown,
@@ -69,6 +71,8 @@
         return CFBoolean;
     if (typeID == CFDataGetTypeID())
         return CFData;
+    if (typeID == CFDateGetTypeID())
+        return CFDate;
     if (typeID == CFDictionaryGetTypeID())
         return CFDictionary;
     if (typeID == CFNullGetTypeID())
@@ -82,13 +86,15 @@
 #if PLATFORM(MAC)
     if (typeID == SecCertificateGetTypeID())
         return SecCertificate;
+    if (typeID == SecKeychainItemGetTypeID())
+        return SecKeychainItem;
 #endif
 
     ASSERT_NOT_REACHED();
     return Unknown;
 }
 
-static void encode(ArgumentEncoder* encoder, CFTypeRef typeRef)
+void encode(ArgumentEncoder* encoder, CFTypeRef typeRef)
 {
     CFType type = typeFromCFTypeRef(typeRef);
     encoder->encodeEnum(type);
@@ -103,6 +109,9 @@
     case CFData:
         encode(encoder, static_cast<CFDataRef>(typeRef));
         return;
+    case CFDate:
+        encode(encoder, static_cast<CFDateRef>(typeRef));
+        return;
     case CFDictionary:
         encode(encoder, static_cast<CFDictionaryRef>(typeRef));
         return;
@@ -121,6 +130,9 @@
     case SecCertificate:
         encode(encoder, (SecCertificateRef)typeRef);
         return;
+    case SecKeychainItem:
+        encode(encoder, (SecKeychainItemRef)typeRef);
+        return;
 #endif
     case Null:
         return;
@@ -131,7 +143,7 @@
     ASSERT_NOT_REACHED();
 }
 
-static bool decode(ArgumentDecoder* decoder, RetainPtr<CFTypeRef>& result)
+bool decode(ArgumentDecoder* decoder, RetainPtr<CFTypeRef>& result)
 {
     CFType type;
     if (!decoder->decodeEnum(type))
@@ -159,6 +171,13 @@
         result.adoptCF(data.leakRef());
         return true;
     }
+    case CFDate: {
+        RetainPtr<CFDateRef> date;
+        if (!decode(decoder, date))
+            return false;
+        result.adoptCF(date.leakRef());
+        return true;
+    }
     case CFDictionary: {
         RetainPtr<CFDictionaryRef> dictionary;
         if (!decode(decoder, dictionary))
@@ -198,6 +217,13 @@
         result.adoptCF(certificate.leakRef());
         return true;
     }
+    case SecKeychainItem: {
+        RetainPtr<SecKeychainItemRef> keychainItem;
+        if (!decode(decoder, keychainItem))
+            return false;
+        result.adoptCF(keychainItem.leakRef());
+        return true;
+    }
 #endif
     case Null:
         result = tokenNullTypeRef();
@@ -278,6 +304,21 @@
     return true;
 }
 
+void encode(ArgumentEncoder* encoder, CFDateRef date)
+{
+    encoder->encodeDouble(CFDateGetAbsoluteTime(date));
+}
+
+bool decode(ArgumentDecoder* decoder, RetainPtr<CFDateRef>& result)
+{
+    double absoluteTime;
+    if (!decoder->decodeDouble(absoluteTime))
+        return false;
+
+    result.adoptCF(CFDateCreate(0, absoluteTime));
+    return true;
+}
+
 void encode(ArgumentEncoder* encoder, CFDictionaryRef dictionary)
 {
     CFIndex size = CFDictionaryGetCount(dictionary);
@@ -496,6 +537,30 @@
     result.adoptCF(SecCertificateCreateWithData(0, data.get()));
     return true;
 }
+
+void encode(ArgumentEncoder* encoder, SecKeychainItemRef keychainItem)
+{
+    CFDataRef data;
+    if (SecKeychainItemCreatePersistentReference(keychainItem, &data) == errSecSuccess) {
+        encode(encoder, data);
+        CFRelease(data);
+    }
+}
+
+bool decode(ArgumentDecoder* decoder, RetainPtr<SecKeychainItemRef>& result)
+{
+    RetainPtr<CFDataRef> data;
+    if (!CoreIPC::decode(decoder, data))
+        return false;
+
+    SecKeychainItemRef item;
+    if (SecKeychainItemCopyFromPersistentReference(data.get(), &item) != errSecSuccess || !item)
+        return false;
+    
+    result.adoptCF(item);
+    return true;
+}
+
 #endif
 
 } // namespace CoreIPC

Modified: trunk/Source/WebKit2/Shared/cf/ArgumentCodersCF.h (86687 => 86688)


--- trunk/Source/WebKit2/Shared/cf/ArgumentCodersCF.h	2011-05-17 17:49:58 UTC (rev 86687)
+++ trunk/Source/WebKit2/Shared/cf/ArgumentCodersCF.h	2011-05-17 18:06:20 UTC (rev 86688)
@@ -30,6 +30,7 @@
 
 #if PLATFORM(MAC)
 #include <Security/SecCertificate.h>
+#include <Security/SecKeychainItem.h>
 #endif
 
 namespace CoreIPC {
@@ -49,6 +50,10 @@
 void encode(ArgumentEncoder*, CFDataRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFDataRef>& result);
 
+// CFDateRef
+void encode(ArgumentEncoder*, CFDateRef);
+bool decode(ArgumentDecoder*, RetainPtr<CFDateRef>& result);
+
 // CFDictionaryRef
 void encode(ArgumentEncoder*, CFDictionaryRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFDictionaryRef>& result);
@@ -61,6 +66,10 @@
 void encode(ArgumentEncoder*, CFStringRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFStringRef>& result);
 
+// CFTypeRef
+void encode(ArgumentEncoder*, CFTypeRef);
+bool decode(ArgumentDecoder*, RetainPtr<CFTypeRef>& result);
+
 // CFURLRef
 void encode(ArgumentEncoder*, CFURLRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFURLRef>& result);
@@ -69,6 +78,10 @@
 // SecCertificateRef
 void encode(ArgumentEncoder*, SecCertificateRef);
 bool decode(ArgumentDecoder*, RetainPtr<SecCertificateRef>& result);
+
+// SecKeychainItemRef
+void encode(ArgumentEncoder*, SecKeychainItemRef);
+bool decode(ArgumentDecoder*, RetainPtr<SecKeychainItemRef>& result);
 #endif
 
 CFTypeRef tokenNullTypeRef();

Added: trunk/Source/WebKit2/Shared/mac/SecItemRequestData.cpp (0 => 86688)


--- trunk/Source/WebKit2/Shared/mac/SecItemRequestData.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/mac/SecItemRequestData.cpp	2011-05-17 18:06:20 UTC (rev 86688)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2011 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#include "config.h"
+#include "SecItemRequestData.h"
+
+#include "ArgumentCoders.h"
+#include "ArgumentCodersCF.h"
+
+namespace WebKit {
+
+SecItemRequestData::SecItemRequestData()
+{
+}
+
+SecItemRequestData::SecItemRequestData(CFDictionaryRef query)
+    : m_queryDictionary(query)
+{
+}
+
+SecItemRequestData::SecItemRequestData(CFDictionaryRef query, CFDictionaryRef attributesToMatch)
+    : m_queryDictionary(query)
+    , m_attributesToMatch(attributesToMatch)
+{
+}
+
+void SecItemRequestData::encode(CoreIPC::ArgumentEncoder* encoder) const
+{
+    CoreIPC::encode(encoder, m_queryDictionary.get());
+
+    encoder->encodeBool(m_attributesToMatch.get());
+    if (m_attributesToMatch)
+        CoreIPC::encode(encoder, m_attributesToMatch.get());
+}
+
+bool SecItemRequestData::decode(CoreIPC::ArgumentDecoder* decoder, SecItemRequestData& secItemRequestData)
+{    
+    if (!CoreIPC::decode(decoder, secItemRequestData.m_queryDictionary))
+        return false;
+    
+    bool expectAttributes;
+    if (!decoder->decodeBool(expectAttributes))
+        return false;
+    
+    if (expectAttributes && !CoreIPC::decode(decoder, secItemRequestData.m_attributesToMatch))
+        return false;
+    
+    return true;
+}
+
+} // namespace WebKit

Added: trunk/Source/WebKit2/Shared/mac/SecItemRequestData.h (0 => 86688)


--- trunk/Source/WebKit2/Shared/mac/SecItemRequestData.h	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/mac/SecItemRequestData.h	2011-05-17 18:06:20 UTC (rev 86688)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2011 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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 SecItemRequestData_h
+#define SecItemRequestData_h
+
+#include <wtf/RetainPtr.h>
+
+namespace CoreIPC {
+    class ArgumentDecoder;
+    class ArgumentEncoder;
+}
+
+namespace WebKit {
+    
+class SecItemRequestData {
+public:
+    SecItemRequestData();
+    SecItemRequestData(CFDictionaryRef query);
+    SecItemRequestData(CFDictionaryRef query, CFDictionaryRef attributesToMatch);
+
+    void encode(CoreIPC::ArgumentEncoder*) const;
+    static bool decode(CoreIPC::ArgumentDecoder*, SecItemRequestData&);
+
+    CFDictionaryRef query() const { return m_queryDictionary.get(); }
+    CFDictionaryRef attributesToMatch() const { return m_attributesToMatch.get(); }
+
+private:
+    RetainPtr<CFDictionaryRef> m_queryDictionary;
+    RetainPtr<CFDictionaryRef> m_attributesToMatch;
+};
+    
+} // namespace WebKit
+
+#endif // SecItemRequestData_h

Added: trunk/Source/WebKit2/Shared/mac/SecItemResponseData.cpp (0 => 86688)


--- trunk/Source/WebKit2/Shared/mac/SecItemResponseData.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/mac/SecItemResponseData.cpp	2011-05-17 18:06:20 UTC (rev 86688)
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2011 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#include "config.h"
+#include "SecItemResponseData.h"
+
+#include "ArgumentCoders.h"
+#include "ArgumentCodersCF.h"
+
+namespace WebKit {
+
+SecItemResponseData::SecItemResponseData()
+{
+}
+
+SecItemResponseData::SecItemResponseData(CFTypeRef resultObject, OSStatus resultCode)
+    : m_resultObject(resultObject)
+    , m_resultCode(resultCode)
+{
+}
+
+void SecItemResponseData::encode(CoreIPC::ArgumentEncoder* encoder) const
+{
+    encoder->encodeInt64((int64_t)m_resultCode);
+    encoder->encodeBool(m_resultObject.get());
+    if (m_resultObject)
+        CoreIPC::encode(encoder, m_resultObject.get());
+}
+
+bool SecItemResponseData::decode(CoreIPC::ArgumentDecoder* decoder, SecItemResponseData& secItemResponseData)
+{
+    int64_t resultCode;
+    if (!decoder->decodeInt64(resultCode))
+        return false;
+    secItemResponseData.m_resultCode = (OSStatus)resultCode;
+    secItemResponseData.m_resultObject = 0;
+
+    bool expectResultObject;
+    if (!decoder->decodeBool(expectResultObject))
+        return false;
+
+    if (expectResultObject && !CoreIPC::decode(decoder, secItemResponseData.m_resultObject))
+        return false;
+
+    return true;
+}
+
+} // namespace WebKit

Added: trunk/Source/WebKit2/Shared/mac/SecItemResponseData.h (0 => 86688)


--- trunk/Source/WebKit2/Shared/mac/SecItemResponseData.h	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/mac/SecItemResponseData.h	2011-05-17 18:06:20 UTC (rev 86688)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2011 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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 SecItemResponseData_h
+#define SecItemResponseData_h
+
+#include <wtf/RetainPtr.h>
+
+namespace CoreIPC {
+    class ArgumentDecoder;
+    class ArgumentEncoder;
+}
+
+namespace WebKit {
+    
+class SecItemResponseData {
+public:
+    SecItemResponseData();
+    SecItemResponseData(CFTypeRef result, OSStatus);
+
+    void encode(CoreIPC::ArgumentEncoder*) const;
+    static bool decode(CoreIPC::ArgumentDecoder*, SecItemResponseData&);
+
+    RetainPtr<CFTypeRef> resultObject() { return m_resultObject; }
+    OSStatus resultCode() const { return m_resultCode; }
+
+private:
+    RetainPtr<CFTypeRef> m_resultObject;
+    OSStatus m_resultCode;
+};
+    
+} // namespace WebKit
+
+#endif // SecItemResponseData_h

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (86687 => 86688)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2011-05-17 17:49:58 UTC (rev 86687)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2011-05-17 18:06:20 UTC (rev 86688)
@@ -370,6 +370,10 @@
 		51D02F6B132EC73700BEAA96 /* WebIconDatabaseProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D02F68132EC73700BEAA96 /* WebIconDatabaseProxyMessageReceiver.cpp */; };
 		51D02F6C132EC73700BEAA96 /* WebIconDatabaseProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D02F69132EC73700BEAA96 /* WebIconDatabaseProxyMessages.h */; };
 		51D1304E1382E5B700351EDD /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCF5068412431861005955AE /* Security.framework */; };
+		51D130531382EAC000351EDD /* SecItemRequestData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D1304F1382EAC000351EDD /* SecItemRequestData.cpp */; };
+		51D130541382EAC000351EDD /* SecItemRequestData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D130501382EAC000351EDD /* SecItemRequestData.h */; };
+		51D130551382EAC000351EDD /* SecItemResponseData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D130511382EAC000351EDD /* SecItemResponseData.cpp */; };
+		51D130561382EAC000351EDD /* SecItemResponseData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D130521382EAC000351EDD /* SecItemResponseData.h */; };
 		6501BD1A12F1243400E9F248 /* WKBundleInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65B86F1712F11D7B00B7DD8A /* WKBundleInspector.cpp */; };
 		659C551E130006410025C0C2 /* InjectedBundlePageResourceLoadClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6546A82913000164000CEB1C /* InjectedBundlePageResourceLoadClient.cpp */; };
 		65B86F1E12F11DE300B7DD8A /* WKBundleInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 65B86F1812F11D7B00B7DD8A /* WKBundleInspector.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1293,6 +1297,10 @@
 		51D02F67132EC73700BEAA96 /* WebIconDatabaseMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIconDatabaseMessages.h; sourceTree = "<group>"; };
 		51D02F68132EC73700BEAA96 /* WebIconDatabaseProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebIconDatabaseProxyMessageReceiver.cpp; sourceTree = "<group>"; };
 		51D02F69132EC73700BEAA96 /* WebIconDatabaseProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIconDatabaseProxyMessages.h; sourceTree = "<group>"; };
+		51D1304F1382EAC000351EDD /* SecItemRequestData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SecItemRequestData.cpp; sourceTree = "<group>"; };
+		51D130501382EAC000351EDD /* SecItemRequestData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecItemRequestData.h; sourceTree = "<group>"; };
+		51D130511382EAC000351EDD /* SecItemResponseData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SecItemResponseData.cpp; sourceTree = "<group>"; };
+		51D130521382EAC000351EDD /* SecItemResponseData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecItemResponseData.h; sourceTree = "<group>"; };
 		5DAD7294116FF70B00EE5396 /* WebProcess.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebProcess.xcconfig; sourceTree = "<group>"; };
 		5DAD73F1116FF90C00EE5396 /* BaseTarget.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = BaseTarget.xcconfig; sourceTree = "<group>"; };
 		6546A82913000164000CEB1C /* InjectedBundlePageResourceLoadClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageResourceLoadClient.cpp; sourceTree = "<group>"; };
@@ -2868,6 +2876,10 @@
 				BCF505E61243047B005955AE /* PlatformCertificateInfo.mm */,
 				E1CC1B8F12D7EADF00625838 /* PrintInfoMac.mm */,
 				1AAB4AA91296F1540023952F /* SandboxExtensionMac.mm */,
+				51D1304F1382EAC000351EDD /* SecItemRequestData.cpp */,
+				51D130501382EAC000351EDD /* SecItemRequestData.h */,
+				51D130511382EAC000351EDD /* SecItemResponseData.cpp */,
+				51D130521382EAC000351EDD /* SecItemResponseData.h */,
 				1A9636BA12F348490078A062 /* ShareableSurface.cpp */,
 				1A9636BB12F348490078A062 /* ShareableSurface.h */,
 				BC9E95D211449B0300870E71 /* UpdateChunk.cpp */,
@@ -3778,6 +3790,8 @@
 				1A7C6CDB1378950800B9C04D /* EnvironmentVariables.h in Headers */,
 				510031D51379C11300C8DFE4 /* WebProcessShim.h in Headers */,
 				1A179780137EE82C00F97D45 /* PluginCreationParameters.h in Headers */,
+				51D130541382EAC000351EDD /* SecItemRequestData.h in Headers */,
+				51D130561382EAC000351EDD /* SecItemResponseData.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -4441,6 +4455,8 @@
 				1A7C6CDA1378950800B9C04D /* EnvironmentVariables.cpp in Sources */,
 				1A17977F137EE82C00F97D45 /* PluginCreationParameters.cpp in Sources */,
 				BCE17B7D1381F1170012A641 /* WKPagePrivateMac.cpp in Sources */,
+				51D130531382EAC000351EDD /* SecItemRequestData.cpp in Sources */,
+				51D130551382EAC000351EDD /* SecItemResponseData.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to