Reviewed by Adam.
authorkmccullo <kmccullo@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Oct 2007 23:26:58 +0000 (23:26 +0000)
committerkmccullo <kmccullo@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Oct 2007 23:26:58 +0000 (23:26 +0000)
        - Stubbed out IWebScriptCallFrame for Drosera.

        * Interfaces/IWebScriptCallFrame.idl: Added function declarations.
        * WebKit.vcproj/WebKit.vcproj: Added .h/.cpp files to the project.
        * WebScriptCallFrame.cpp: Added.
        (WebScriptCallFrame::WebScriptCallFrame):
        (WebScriptCallFrame::~WebScriptCallFrame):
        (WebScriptCallFrame::createInstance):
        (WebScriptCallFrame::QueryInterface):
        (WebScriptCallFrame::AddRef):
        (WebScriptCallFrame::Release):
        (WebScriptCallFrame::caller):
        (WebScriptCallFrame::scopeChain):
        (WebScriptCallFrame::functionName):
        (WebScriptCallFrame::evaluateWebScript):
        * WebScriptCallFrame.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27156 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/win/ChangeLog
WebKit/win/Interfaces/IWebScriptCallFrame.idl
WebKit/win/WebKit.vcproj/WebKit.vcproj
WebKit/win/WebScriptCallFrame.cpp [new file with mode: 0644]
WebKit/win/WebScriptCallFrame.h [new file with mode: 0644]

index fd0896c924061964a9dff3da870b049d164321b0..1a043c49bb0195f9d582d064a77c0e0d0cf2ecb3 100644 (file)
@@ -1,3 +1,24 @@
+2007-10-27  Kevin McCullough  <kmccullough@apple.com>
+
+        Reviewed by Adam.
+
+        - Stubbed out IWebScriptCallFrame for Drosera.
+
+        * Interfaces/IWebScriptCallFrame.idl: Added function declarations.
+        * WebKit.vcproj/WebKit.vcproj: Added .h/.cpp files to the project.
+        * WebScriptCallFrame.cpp: Added.
+        (WebScriptCallFrame::WebScriptCallFrame):
+        (WebScriptCallFrame::~WebScriptCallFrame):
+        (WebScriptCallFrame::createInstance):
+        (WebScriptCallFrame::QueryInterface):
+        (WebScriptCallFrame::AddRef):
+        (WebScriptCallFrame::Release):
+        (WebScriptCallFrame::caller):
+        (WebScriptCallFrame::scopeChain):
+        (WebScriptCallFrame::functionName):
+        (WebScriptCallFrame::evaluateWebScript):
+        * WebScriptCallFrame.h: Added.
+
 2007-10-26  Kevin McCullough  <kmccullough@apple.com>
 
         Reviewed by Sam and Steve.
index 216bb335b8a4e1053231b71763d6688fa7c1a09b..eac037e08511e9aaeea321e1b61af942e6f7c542 100644 (file)
@@ -65,4 +65,8 @@ import "ocidl.idl";
 ]
 interface IWebScriptCallFrame : IUnknown
 {
-}
+    HRESULT caller([out, retval] IWebScriptCallFrame**);
+    HRESULT scopeChain([out, retval] VARIANT*);
+    HRESULT functionName([out, retval] BSTR*);
+    HRESULT evaluateWebScript([in] BSTR script, [out, retval] VARIANT*);
+}\r
index abf3c93d281ad4798ca1215cdcc36d047685d644..19740e0d013fbde524cbcb32ee59fb254dcfbc90 100644 (file)
                                RelativePath="..\WebResource.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\WebScriptCallFrame.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\WebScriptDebugServer.h"\r
                                >\r
                                RelativePath="..\WebResource.cpp"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\WebScriptCallFrame.cpp"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\WebScriptDebugServer.cpp"\r
                                >\r
diff --git a/WebKit/win/WebScriptCallFrame.cpp b/WebKit/win/WebScriptCallFrame.cpp
new file mode 100644 (file)
index 0000000..af8bf19
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "WebKitDLL.h"
+#include "WebScriptCallFrame.h"
+
+// WebScriptCallFrame ------------------------------------------------------------
+
+WebScriptCallFrame::WebScriptCallFrame()
+    : m_refCount(0)
+{
+    gClassCount++;
+}
+
+WebScriptCallFrame::~WebScriptCallFrame()
+{
+    gClassCount--;
+}
+
+WebScriptCallFrame* WebScriptCallFrame::createInstance()
+{
+    WebScriptCallFrame* instance = new WebScriptCallFrame();
+    instance->AddRef();
+    return instance;
+}
+
+// IUnknown -------------------------------------------------------------------
+
+HRESULT STDMETHODCALLTYPE WebScriptCallFrame::QueryInterface(REFIID riid, void** ppvObject)
+{
+    *ppvObject = 0;
+    if (IsEqualGUID(riid, IID_IUnknown))
+        *ppvObject = static_cast<IWebScriptCallFrame*>(this);
+    else if (IsEqualGUID(riid, IID_IWebScriptCallFrame))
+        *ppvObject = static_cast<IWebScriptCallFrame*>(this);
+    else
+        return E_NOINTERFACE;
+
+    AddRef();
+    return S_OK;
+}
+
+ULONG STDMETHODCALLTYPE WebScriptCallFrame::AddRef(void)
+{
+    return ++m_refCount;
+}
+
+ULONG STDMETHODCALLTYPE WebScriptCallFrame::Release(void)
+{
+    ULONG newRef = --m_refCount;
+    if (!newRef)
+        delete(this);
+
+    return newRef;
+}
+
+// IWebScriptCallFrame -----------------------------------------------------------
+
+HRESULT STDMETHODCALLTYPE WebScriptCallFrame::caller(
+    /* [out, retval] */ IWebScriptCallFrame**)
+{
+    return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebScriptCallFrame::scopeChain(
+    /* [out, retval] */ VARIANT*)
+{
+    return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebScriptCallFrame::functionName(
+    /* [out, retval] */ BSTR*)
+{
+    return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebScriptCallFrame::evaluateWebScript(
+    /* [in] */ BSTR,
+    /* [out, retval] */ VARIANT*)
+{
+    return S_OK;
+}
diff --git a/WebKit/win/WebScriptCallFrame.h b/WebKit/win/WebScriptCallFrame.h
new file mode 100644 (file)
index 0000000..ed916ca
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * 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 WebScriptCallFrame_h
+#define WebScriptCallFrame_h
+
+#include "IWebScriptCallFrame.h"
+
+class WebScriptCallFrame : public IWebScriptCallFrame {
+public:
+    static WebScriptCallFrame* createInstance();
+
+private:
+    WebScriptCallFrame();
+    ~WebScriptCallFrame();
+
+public:
+    // IUnknown
+    virtual HRESULT STDMETHODCALLTYPE QueryInterface( 
+        /* [in] */ REFIID riid,
+        /* [retval][out] */ void** ppvObject);
+    
+    virtual ULONG STDMETHODCALLTYPE AddRef( void);
+
+    virtual ULONG STDMETHODCALLTYPE Release( void);
+
+    // IWebScriptCallFrame
+    virtual HRESULT STDMETHODCALLTYPE caller(
+        /* [out, retval] */ IWebScriptCallFrame**);
+
+    virtual HRESULT STDMETHODCALLTYPE scopeChain(
+        /* [out, retval] */ VARIANT*);
+
+    virtual HRESULT STDMETHODCALLTYPE functionName(
+        /* [out, retval] */ BSTR*);
+
+    virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
+        /* [in] */ BSTR script,
+        /* [out, retval] */ VARIANT*);
+
+private:
+    ULONG m_refCount;
+};
+
+#endif