2011-04-13 Steve Block <steveblock@google.com>
authorsteveblock@google.com <steveblock@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 May 2011 10:54:06 +0000 (10:54 +0000)
committersteveblock@google.com <steveblock@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 May 2011 10:54:06 +0000 (10:54 +0000)
        Reviewed by Eric Seidel.

        Geolocation callbacks should make use of new callback generation mechanism
        https://bugs.webkit.org/show_bug.cgi?id=40065

        No new tests, refactoring only.

        * Android.derived.jscbindings.mk:
        * Android.derived.v8bindings.mk:
        * Android.jscbindings.mk:
        * Android.v8bindings.mk:
        * CMakeLists.txt:
        * CodeGenerators.pri:
        * DerivedSources.cpp:
        * DerivedSources.make:
        * GNUmakefile.list.am:
        * UseJSC.cmake:
        * WebCore.gypi:
        * WebCore.order:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSBindingsAllInOne.cpp:
        * bindings/js/JSCustomPositionCallback.cpp: Removed.
        * bindings/js/JSCustomPositionCallback.h: Removed.
        * bindings/js/JSCustomPositionErrorCallback.cpp: Removed.
        * bindings/js/JSCustomPositionErrorCallback.h: Removed.
        * bindings/js/JSGeolocationCustom.cpp:
        (WebCore::JSGeolocation::getCurrentPosition):
        (WebCore::JSGeolocation::watchPosition):
        * bindings/v8/custom/V8CustomPositionCallback.cpp: Removed.
        * bindings/v8/custom/V8CustomPositionCallback.h: Removed.
        * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: Removed.
        * bindings/v8/custom/V8CustomPositionErrorCallback.h: Removed.
        * bindings/v8/custom/V8GeolocationCustom.cpp:
        (WebCore::V8Geolocation::getCurrentPositionCallback):
        (WebCore::V8Geolocation::watchPositionCallback):
        * page/PositionCallback.h:
        * page/PositionCallback.idl: Added.
        * page/PositionErrorCallback.h:
        * page/PositionErrorCallback.idl: Added.

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

27 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/CodeGenerators.pri
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.list.am
Source/WebCore/UseJSC.cmake
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.order
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSCustomPositionCallback.cpp [deleted file]
Source/WebCore/bindings/js/JSCustomPositionCallback.h [deleted file]
Source/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp [deleted file]
Source/WebCore/bindings/js/JSCustomPositionErrorCallback.h [deleted file]
Source/WebCore/bindings/js/JSGeolocationCustom.cpp
Source/WebCore/bindings/v8/custom/V8CustomPositionCallback.cpp [deleted file]
Source/WebCore/bindings/v8/custom/V8CustomPositionCallback.h [deleted file]
Source/WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.cpp [deleted file]
Source/WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.h [deleted file]
Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
Source/WebCore/page/PositionCallback.h
Source/WebCore/page/PositionCallback.idl [new file with mode: 0644]
Source/WebCore/page/PositionErrorCallback.h
Source/WebCore/page/PositionErrorCallback.idl [new file with mode: 0644]

index 8d09359..8bbe5ec 100644 (file)
@@ -331,7 +331,9 @@ SET(WebCore_IDL_FILES
     page/Performance.idl
     page/PerformanceNavigation.idl
     page/PerformanceTiming.idl
+    page/PositionCallback.idl
     page/PositionError.idl
+    page/PositionErrorCallback.idl
     page/Screen.idl
     page/SpeechInputEvent.idl
     page/SpeechInputResult.idl
index 494ee74..6852730 100644 (file)
@@ -1,3 +1,47 @@
+2011-04-13  Steve Block  <steveblock@google.com>
+
+        Reviewed by Eric Seidel.
+
+        Geolocation callbacks should make use of new callback generation mechanism
+        https://bugs.webkit.org/show_bug.cgi?id=40065
+
+        No new tests, refactoring only.
+
+        * Android.derived.jscbindings.mk:
+        * Android.derived.v8bindings.mk:
+        * Android.jscbindings.mk:
+        * Android.v8bindings.mk:
+        * CMakeLists.txt:
+        * CodeGenerators.pri:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * GNUmakefile.list.am:
+        * UseJSC.cmake:
+        * WebCore.gypi:
+        * WebCore.order:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSBindingsAllInOne.cpp:
+        * bindings/js/JSCustomPositionCallback.cpp: Removed.
+        * bindings/js/JSCustomPositionCallback.h: Removed.
+        * bindings/js/JSCustomPositionErrorCallback.cpp: Removed.
+        * bindings/js/JSCustomPositionErrorCallback.h: Removed.
+        * bindings/js/JSGeolocationCustom.cpp:
+        (WebCore::JSGeolocation::getCurrentPosition):
+        (WebCore::JSGeolocation::watchPosition):
+        * bindings/v8/custom/V8CustomPositionCallback.cpp: Removed.
+        * bindings/v8/custom/V8CustomPositionCallback.h: Removed.
+        * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: Removed.
+        * bindings/v8/custom/V8CustomPositionErrorCallback.h: Removed.
+        * bindings/v8/custom/V8GeolocationCustom.cpp:
+        (WebCore::V8Geolocation::getCurrentPositionCallback):
+        (WebCore::V8Geolocation::watchPositionCallback):
+        * page/PositionCallback.h:
+        * page/PositionCallback.idl: Added.
+        * page/PositionErrorCallback.h:
+        * page/PositionErrorCallback.idl: Added.
+
 2011-05-23  Pavel Podivilov  <podivilov@chromium.org>
 
         Reviewed by Yury Semikhatsky.
index c93b247..0efdaa0 100644 (file)
@@ -331,7 +331,9 @@ IDL_BINDINGS += \
     page/Performance.idl \
     page/PerformanceNavigation.idl \
     page/PerformanceTiming.idl \
+    page/PositionCallback.idl \
     page/PositionError.idl \
+    page/PositionErrorCallback.idl \
     page/Screen.idl \
     page/SpeechInputEvent.idl \
     page/SpeechInputResult.idl \
index 7d5e4f9..82d7366 100644 (file)
 #include "JSPerformanceNavigation.cpp"
 #include "JSPerformanceTiming.cpp"
 #include "JSPopStateEvent.cpp"
+#include "JSPositionCallback.cpp"
 #include "JSPositionError.cpp"
+#include "JSPositionErrorCallback.cpp"
 #include "JSProcessingInstruction.cpp"
 #include "JSProgressEvent.cpp"
 #include "JSRange.cpp"
index 7bcf300..f4e0065 100644 (file)
@@ -324,7 +324,9 @@ DOM_CLASSES = \
     PerformanceNavigation \
     PerformanceTiming \
     PopStateEvent \
+    PositionCallback \
     PositionError \
+    PositionErrorCallback \
     ProcessingInstruction \
     ProgressEvent \
     RGBColor \
index dbd1f1f..8fe6ced 100644 (file)
@@ -405,8 +405,12 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSPerformanceTiming.h \
        DerivedSources/WebCore/JSPopStateEvent.cpp \
        DerivedSources/WebCore/JSPopStateEvent.h \
+       DerivedSources/WebCore/JSPositionCallback.cpp \
+       DerivedSources/WebCore/JSPositionCallback.h \
        DerivedSources/WebCore/JSPositionError.cpp \
        DerivedSources/WebCore/JSPositionError.h \
+       DerivedSources/WebCore/JSPositionErrorCallback.cpp \
+       DerivedSources/WebCore/JSPositionErrorCallback.h \
        DerivedSources/WebCore/JSProcessingInstruction.cpp \
        DerivedSources/WebCore/JSProcessingInstruction.h \
        DerivedSources/WebCore/JSProgressEvent.cpp \
@@ -653,10 +657,6 @@ webcore_sources += \
        Source/WebCore/bindings/js/JSClipboardCustom.cpp \
        Source/WebCore/bindings/js/JSConsoleCustom.cpp \
        Source/WebCore/bindings/js/JSCoordinatesCustom.cpp \
-       Source/WebCore/bindings/js/JSCustomPositionCallback.cpp \
-       Source/WebCore/bindings/js/JSCustomPositionCallback.h \
-       Source/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp \
-       Source/WebCore/bindings/js/JSCustomPositionErrorCallback.h \
        Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp \
        Source/WebCore/bindings/js/JSCustomVoidCallback.cpp \
        Source/WebCore/bindings/js/JSCustomVoidCallback.h \
index cddbd5f..5bca36f 100644 (file)
@@ -31,8 +31,6 @@ LIST(APPEND WebCore_SOURCES
     bindings/js/JSClipboardCustom.cpp
     bindings/js/JSConsoleCustom.cpp
     bindings/js/JSCoordinatesCustom.cpp
-    bindings/js/JSCustomPositionCallback.cpp
-    bindings/js/JSCustomPositionErrorCallback.cpp
     bindings/js/JSCustomSQLStatementErrorCallback.cpp
     bindings/js/JSCustomVoidCallback.cpp
     bindings/js/JSCustomXPathNSResolver.cpp
index b1156a4..875f2af 100644 (file)
             'page/Performance.idl',
             'page/PerformanceNavigation.idl',
             'page/PerformanceTiming.idl',
+            'page/PositionCallback.idl',
             'page/PositionError.idl',
+            'page/PositionErrorCallback.idl',
             'page/Screen.idl',
             'page/SpeechInputEvent.idl',
             'page/SpeechInputResult.idl',
             'bindings/js/JSConsoleCustom.cpp',
             'bindings/js/JSConvolverNodeCustom.cpp',
             'bindings/js/JSCoordinatesCustom.cpp',
-            'bindings/js/JSCustomPositionCallback.cpp',
-            'bindings/js/JSCustomPositionCallback.h',
-            'bindings/js/JSCustomPositionErrorCallback.cpp',
-            'bindings/js/JSCustomPositionErrorCallback.h',
             'bindings/js/JSCustomSQLStatementErrorCallback.cpp',
             'bindings/js/JSCustomVoidCallback.cpp',
             'bindings/js/JSCustomVoidCallback.h',
             'bindings/v8/custom/V8ClipboardCustom.cpp',
             'bindings/v8/custom/V8ConsoleCustom.cpp',
             'bindings/v8/custom/V8CoordinatesCustom.cpp',
-            'bindings/v8/custom/V8CustomPositionCallback.cpp',
-            'bindings/v8/custom/V8CustomPositionCallback.h',
-            'bindings/v8/custom/V8CustomPositionErrorCallback.cpp',
-            'bindings/v8/custom/V8CustomPositionErrorCallback.h',
             'bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp',
             'bindings/v8/custom/V8CustomVoidCallback.cpp',
             'bindings/v8/custom/V8CustomVoidCallback.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPerformanceTiming.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPopStateEvent.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPopStateEvent.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPositionCallback.cpp',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPositionCallback.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPositionError.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPositionError.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPositionErrorCallback.cpp',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPositionErrorCallback.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSProcessingInstruction.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSProcessingInstruction.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSProgressEvent.cpp',
index af1a2ab..55e39a1 100644 (file)
@@ -12764,11 +12764,11 @@ __ZN7WebCore48jsGeolocationPrototypeFunctionGetCurrentPositionEPN3JSC9ExecStateE
 __ZNK7WebCore13JSGeolocation9classInfoEv
 __ZN7WebCore13JSGeolocation18getCurrentPositionEPN3JSC9ExecStateERKNS1_7ArgListE
 __ZN7WebCoreL22createPositionCallbackEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectENS0_7JSValueE
-__ZN7WebCore24JSCustomPositionCallbackC1EPN3JSC8JSObjectEPNS_17JSDOMGlobalObjectE
-__ZN7WebCore24JSCustomPositionCallbackC2EPN3JSC8JSObjectEPNS_17JSDOMGlobalObjectE
+__ZN7WebCore24JSPositionCallbackC1EPN3JSC8JSObjectEPNS_17JSDOMGlobalObjectE
+__ZN7WebCore24JSPositionCallbackC2EPN3JSC8JSObjectEPNS_17JSDOMGlobalObjectE
 __ZN7WebCoreL27createPositionErrorCallbackEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectENS0_7JSValueE
-__ZN7WebCore29JSCustomPositionErrorCallbackC1EPN3JSC8JSObjectEPNS_17JSDOMGlobalObjectE
-__ZN7WebCore29JSCustomPositionErrorCallbackC2EPN3JSC8JSObjectEPNS_17JSDOMGlobalObjectE
+__ZN7WebCore29JSPositionErrorCallbackC1EPN3JSC8JSObjectEPNS_17JSDOMGlobalObjectE
+__ZN7WebCore29JSPositionErrorCallbackC2EPN3JSC8JSObjectEPNS_17JSDOMGlobalObjectE
 __ZN7WebCoreL21createPositionOptionsEPN3JSC9ExecStateENS0_7JSValueE
 __ZN7WebCore11Geolocation18getCurrentPositionEN3WTF10PassRefPtrINS_16PositionCallbackEEENS2_INS_21PositionErrorCallbackEEENS2_I
 __ZN7WebCore11Geolocation12startRequestEN3WTF10PassRefPtrINS_16PositionCallbackEEENS2_INS_21PositionErrorCallbackEEENS2_INS_15P
@@ -12787,7 +12787,7 @@ __ZN7WebCore11Geolocation12setIsAllowedEb
 __ZN7WebCore11Geolocation11GeoNotifier13setFatalErrorEN3WTF10PassRefPtrINS_13PositionErrorEEE
 __ZN7WebCore5TimerINS_11Geolocation11GeoNotifierEE5firedEv
 __ZN7WebCore11Geolocation11GeoNotifier10timerFiredEPNS_5TimerIS1_EE
-__ZN7WebCore29JSCustomPositionErrorCallback11handleEventEPNS_13PositionErrorE
+__ZN7WebCore29JSPositionErrorCallback11handleEventEPNS_13PositionErrorE
 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_13PositionErrorE
 __ZN7WebCore15JSPositionError15createPrototypeEPN3JSC9ExecStateEPNS1_14JSGlobalObjectE
 __ZN7WebCore15JSPositionErrorC1EN3WTF17NonNullPassRefPtrIN3JSC9StructureEEEPNS_17JSDOMGlobalObjectENS1_10PassRefPtrINS_13Positi
@@ -12797,8 +12797,8 @@ __ZN7WebCore11Geolocation18fatalErrorOccurredEPNS0_11GeoNotifierE
 __ZN7WebCore11Geolocation8Watchers6removeEPNS0_11GeoNotifierE
 __ZNK7WebCore11Geolocation8Watchers7isEmptyEv
 __ZN7WebCore11Geolocation12stopUpdatingEv
-__ZN7WebCore29JSCustomPositionErrorCallbackD0Ev
-__ZN7WebCore24JSCustomPositionCallbackD0Ev
+__ZN7WebCore29JSPositionErrorCallbackD0Ev
+__ZN7WebCore24JSPositionCallbackD0Ev
 __ZN7WebCore15JSPositionErrorD1Ev
 __ZN7WebCore15JSPositionErrorD2Ev
 __ZN7WebCore11Geolocation15disconnectFrameEv
index 25e5f4c..e23209a 100644 (file)
@@ -251,8 +251,6 @@ v8 {
         bindings/js/JSClipboardCustom.cpp \
         bindings/js/JSConsoleCustom.cpp \
         bindings/js/JSCoordinatesCustom.cpp \
-        bindings/js/JSCustomPositionCallback.cpp \
-        bindings/js/JSCustomPositionErrorCallback.cpp \
         bindings/js/JSCustomVoidCallback.cpp \
         bindings/js/JSCustomXPathNSResolver.cpp \
         bindings/js/JSDOMBinding.cpp \
@@ -1213,8 +1211,6 @@ HEADERS += \
 
 v8 {
     HEADERS += \
-        bindings/v8/custom/V8CustomPositionCallback.h \
-        bindings/v8/custom/V8CustomPositionErrorCallback.h  \
         bindings/v8/custom/V8CustomVoidCallback.h \
         bindings/v8/custom/V8CustomXPathNSResolver.h \
         bindings/v8/custom/V8HTMLAudioElementConstructor.h \
@@ -1292,8 +1288,6 @@ v8 {
         bindings/js/JSAudioConstructor.h \
         bindings/js/JSCSSStyleDeclarationCustom.h \
         bindings/js/JSCallbackData.h \
-        bindings/js/JSCustomPositionCallback.h \
-        bindings/js/JSCustomPositionErrorCallback.h \
         bindings/js/JSCustomVoidCallback.h \
         bindings/js/JSCustomXPathNSResolver.h \
         bindings/js/JSDOMBinding.h \
@@ -3104,8 +3098,6 @@ contains(DEFINES, WTF_USE_QT_BEARER=1) {
 contains(DEFINES, ENABLE_GEOLOCATION=1) {
     v8 {
         SOURCES += \
-            bindings/v8/custom/V8CustomPositionCallback.cpp \
-            bindings/v8/custom/V8CustomPositionErrorCallback.cpp \
             bindings/v8/custom/V8GeolocationCustom.cpp
     }
 }
index 8be027d..1525325 100755 (executable)
                                >
                        </File>
                        <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPositionCallback.cpp"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_All|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Production|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPositionCallback.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPositionError.cpp"
                                >
                                <FileConfiguration
                                >
                        </File>
                        <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPositionErrorCallback.cpp"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_All|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Production|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSPositionErrorCallback.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSProcessingInstruction.cpp"
                                >
                                <FileConfiguration
                                        </FileConfiguration>
                                </File>
                                <File
-                                       RelativePath="..\bindings\js\JSCustomPositionCallback.cpp"
-                                       >
-                                       <FileConfiguration
-                                               Name="Debug|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Debug_Cairo_CFLite|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release_Cairo_CFLite|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Debug_All|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Production|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                               </File>
-                               <File
-                                       RelativePath="..\bindings\js\JSCustomPositionCallback.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\bindings\js\JSCustomPositionErrorCallback.cpp"
-                                       >
-                                       <FileConfiguration
-                                               Name="Debug|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Debug_Cairo_CFLite|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release_Cairo_CFLite|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Debug_All|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Production|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                               </File>
-                               <File
-                                       RelativePath="..\bindings\js\JSCustomPositionErrorCallback.h"
-                                       >
-                               </File>
-                               <File
                                        RelativePath="..\bindings\js\JSCustomSQLStatementErrorCallback.cpp"
                                        >
                                        <FileConfiguration
index 7c8a5b3..bda6a42 100644 (file)
                5962297A1133EFE200DC4CBB /* GeolocationPositionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 596229791133EFE200DC4CBB /* GeolocationPositionCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
                596950821321059900C3ED18 /* JobjectWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 596950811321059900C3ED18 /* JobjectWrapper.h */; };
                59695084132105A500C3ED18 /* JobjectWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59695083132105A500C3ED18 /* JobjectWrapper.cpp */; };
+               598365DD1355F557001B185D /* JSPositionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 598365DC1355F53C001B185D /* JSPositionCallback.h */; };
+               598365DF1355F562001B185D /* JSPositionErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 598365DE1355F562001B185D /* JSPositionErrorCallback.h */; };
+               598365E41355F604001B185D /* JSPositionCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 598365E31355F604001B185D /* JSPositionCallback.cpp */; };
+               598365E61355F60D001B185D /* JSPositionErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 598365E51355F60D001B185D /* JSPositionErrorCallback.cpp */; };
                598D77DD132541EE00761B22 /* JavaArrayJSC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 598D77DC132541EE00761B22 /* JavaArrayJSC.cpp */; };
                598D77DF132541FA00761B22 /* JavaArrayJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 598D77DE132541FA00761B22 /* JavaArrayJSC.h */; };
                598D77E11325420400761B22 /* JavaFieldJSC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 598D77E01325420400761B22 /* JavaFieldJSC.cpp */; };
                FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */; };
                FE6FD48E0F676E9300092873 /* JSCoordinates.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6FD48C0F676E9300092873 /* JSCoordinates.h */; };
                FE700DD10F92D81A008E2BFE /* JSCoordinatesCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE700DD00F92D81A008E2BFE /* JSCoordinatesCustom.cpp */; };
-               FE80D7A70E9C1ED2000D6F75 /* JSCustomPositionCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80D7A20E9C1ED2000D6F75 /* JSCustomPositionCallback.cpp */; };
-               FE80D7A80E9C1ED2000D6F75 /* JSCustomPositionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = FE80D7A30E9C1ED2000D6F75 /* JSCustomPositionCallback.h */; };
-               FE80D7A90E9C1ED2000D6F75 /* JSCustomPositionErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80D7A40E9C1ED2000D6F75 /* JSCustomPositionErrorCallback.cpp */; };
-               FE80D7AA0E9C1ED2000D6F75 /* JSCustomPositionErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = FE80D7A50E9C1ED2000D6F75 /* JSCustomPositionErrorCallback.h */; };
                FE80D7AB0E9C1ED2000D6F75 /* JSGeolocationCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */; };
                FE80D7C50E9C1F25000D6F75 /* Geolocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80D7B70E9C1F25000D6F75 /* Geolocation.cpp */; };
                FE80D7C60E9C1F25000D6F75 /* Geolocation.h in Headers */ = {isa = PBXBuildFile; fileRef = FE80D7B80E9C1F25000D6F75 /* Geolocation.h */; settings = {ATTRIBUTES = (Private, ); }; };
                590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDeviceOrientationEventCustom.cpp; sourceTree = "<group>"; };
                59309A1011F4AE5800250603 /* DeviceOrientationClientMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeviceOrientationClientMock.cpp; path = mock/DeviceOrientationClientMock.cpp; sourceTree = "<group>"; };
                59309A1211F4AE6A00250603 /* DeviceOrientationClientMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeviceOrientationClientMock.h; path = mock/DeviceOrientationClientMock.h; sourceTree = "<group>"; };
+               593AB6971355CD9200FC8211 /* PositionCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PositionCallback.idl; sourceTree = "<group>"; };
+               593AB6991355CDAE00FC8211 /* PositionErrorCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PositionErrorCallback.idl; sourceTree = "<group>"; };
                593D3EAE1325328C0057E7EE /* JavaMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaMethod.h; sourceTree = "<group>"; };
                593D3EB0132532950057E7EE /* JavaString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaString.h; sourceTree = "<group>"; };
                5958F1CB1343917C0080B31F /* XMLViewer.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = XMLViewer.css; sourceTree = "<group>"; };
                596229791133EFE200DC4CBB /* GeolocationPositionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationPositionCache.h; sourceTree = "<group>"; };
                596950811321059900C3ED18 /* JobjectWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JobjectWrapper.h; sourceTree = "<group>"; };
                59695083132105A500C3ED18 /* JobjectWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JobjectWrapper.cpp; sourceTree = "<group>"; };
+               598365DC1355F53C001B185D /* JSPositionCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPositionCallback.h; sourceTree = "<group>"; };
+               598365DE1355F562001B185D /* JSPositionErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPositionErrorCallback.h; sourceTree = "<group>"; };
+               598365E31355F604001B185D /* JSPositionCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPositionCallback.cpp; sourceTree = "<group>"; };
+               598365E51355F60D001B185D /* JSPositionErrorCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPositionErrorCallback.cpp; sourceTree = "<group>"; };
                598D77DC132541EE00761B22 /* JavaArrayJSC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaArrayJSC.cpp; path = jsc/JavaArrayJSC.cpp; sourceTree = "<group>"; };
                598D77DE132541FA00761B22 /* JavaArrayJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaArrayJSC.h; path = jsc/JavaArrayJSC.h; sourceTree = "<group>"; };
                598D77E01325420400761B22 /* JavaFieldJSC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaFieldJSC.cpp; path = jsc/JavaFieldJSC.cpp; sourceTree = "<group>"; };
                FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCoordinates.cpp; sourceTree = "<group>"; };
                FE6FD48C0F676E9300092873 /* JSCoordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCoordinates.h; sourceTree = "<group>"; };
                FE700DD00F92D81A008E2BFE /* JSCoordinatesCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCoordinatesCustom.cpp; sourceTree = "<group>"; };
-               FE80D7A20E9C1ED2000D6F75 /* JSCustomPositionCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomPositionCallback.cpp; sourceTree = "<group>"; };
-               FE80D7A30E9C1ED2000D6F75 /* JSCustomPositionCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomPositionCallback.h; sourceTree = "<group>"; };
-               FE80D7A40E9C1ED2000D6F75 /* JSCustomPositionErrorCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomPositionErrorCallback.cpp; sourceTree = "<group>"; };
-               FE80D7A50E9C1ED2000D6F75 /* JSCustomPositionErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomPositionErrorCallback.h; sourceTree = "<group>"; };
                FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocationCustom.cpp; sourceTree = "<group>"; };
                FE80D7B70E9C1F25000D6F75 /* Geolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Geolocation.cpp; sourceTree = "<group>"; };
                FE80D7B80E9C1F25000D6F75 /* Geolocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Geolocation.h; sourceTree = "<group>"; };
                65BF02180974806300C43196 /* page */ = {
                        isa = PBXGroup;
                        children = (
+                               593AB6991355CDAE00FC8211 /* PositionErrorCallback.idl */,
+                               593AB6971355CD9200FC8211 /* PositionCallback.idl */,
                                316FE1060E6E1D8400BF6088 /* animation */,
                                93C09A820B064F05005ABD4D /* mac */,
                                8538F0000AD71770006A81D1 /* AbstractView.idl */,
                A83B79100CCB001B000B0825 /* Core */ = {
                        isa = PBXGroup;
                        children = (
+                               598365E51355F60D001B185D /* JSPositionErrorCallback.cpp */,
+                               598365E31355F604001B185D /* JSPositionCallback.cpp */,
+                               598365DE1355F562001B185D /* JSPositionErrorCallback.h */,
+                               598365DC1355F53C001B185D /* JSPositionCallback.h */,
                                65DF31D809D1C122000BE325 /* JSAttr.cpp */,
                                65DF31D909D1C123000BE325 /* JSAttr.h */,
                                93F9B79E0BA6032600854064 /* JSCDATASection.cpp */,
                                B1D5ECB4134B58DA0087C78F /* CallbackFunction.h */,
                                1449E286107D4DB400B5793F /* JSCallbackData.cpp */,
                                1449E24A107D4A8400B5793F /* JSCallbackData.h */,
-                               FE80D7A20E9C1ED2000D6F75 /* JSCustomPositionCallback.cpp */,
-                               FE80D7A30E9C1ED2000D6F75 /* JSCustomPositionCallback.h */,
-                               FE80D7A40E9C1ED2000D6F75 /* JSCustomPositionErrorCallback.cpp */,
-                               FE80D7A50E9C1ED2000D6F75 /* JSCustomPositionErrorCallback.h */,
                                51EC925D0CE90DD400F90308 /* JSCustomSQLStatementErrorCallback.cpp */,
                                1A3417C80CECFF250049CBDE /* JSCustomVoidCallback.cpp */,
                                1A3417C70CECFF250049CBDE /* JSCustomVoidCallback.h */,
                                14CF78A609F58CD800EB3665 /* JSCSSValue.h in Headers */,
                                A8D05FAC0A23B30F005E7203 /* JSCSSValueList.h in Headers */,
                                E4778B80115A581A00B5D372 /* JSCustomEvent.h in Headers */,
-                               FE80D7A80E9C1ED2000D6F75 /* JSCustomPositionCallback.h in Headers */,
-                               FE80D7AA0E9C1ED2000D6F75 /* JSCustomPositionErrorCallback.h in Headers */,
                                1A3417C90CECFF250049CBDE /* JSCustomVoidCallback.h in Headers */,
                                E10B937C0B73C00A003ED890 /* JSCustomXPathNSResolver.h in Headers */,
                                1AE82F900CAAFA9D002237AE /* JSDatabase.h in Headers */,
                                E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
                                977E2E0F12F0FC9C00C13379 /* XSSFilter.h in Headers */,
                                FD537353137B651800008DCE /* ZeroPole.h in Headers */,
+                               598365DD1355F557001B185D /* JSPositionCallback.h in Headers */,
+                               598365DF1355F562001B185D /* JSPositionErrorCallback.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                BC20FB7F0C0E8E6C00D1447F /* JSCSSValueCustom.cpp in Sources */,
                                A8D05FAB0A23B30F005E7203 /* JSCSSValueList.cpp in Sources */,
                                E4778B7F115A581A00B5D372 /* JSCustomEvent.cpp in Sources */,
-                               FE80D7A70E9C1ED2000D6F75 /* JSCustomPositionCallback.cpp in Sources */,
-                               FE80D7A90E9C1ED2000D6F75 /* JSCustomPositionErrorCallback.cpp in Sources */,
                                51EC92650CE90DD400F90308 /* JSCustomSQLStatementErrorCallback.cpp in Sources */,
                                1A3417CA0CECFF250049CBDE /* JSCustomVoidCallback.cpp in Sources */,
                                E10B93C30B73C291003ED890 /* JSCustomXPathNSResolver.cpp in Sources */,
                                E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
                                977E2E0E12F0FC9C00C13379 /* XSSFilter.cpp in Sources */,
                                FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
+                               598365E41355F604001B185D /* JSPositionCallback.cpp in Sources */,
+                               598365E61355F60D001B185D /* JSPositionErrorCallback.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index d1919a2..c3c2d43 100644 (file)
@@ -48,8 +48,6 @@
 #include "JSClipboardCustom.cpp"
 #include "JSConsoleCustom.cpp"
 #include "JSCoordinatesCustom.cpp"
-#include "JSCustomPositionCallback.cpp"
-#include "JSCustomPositionErrorCallback.cpp"
 #include "JSCustomSQLStatementErrorCallback.cpp"
 #include "JSCustomVoidCallback.cpp"
 #include "JSCustomXPathNSResolver.cpp"
 #include "SerializedScriptValue.cpp"
 #include "WorkerScriptController.cpp"
 #include "WorkerScriptDebugServer.cpp"
-
diff --git a/Source/WebCore/bindings/js/JSCustomPositionCallback.cpp b/Source/WebCore/bindings/js/JSCustomPositionCallback.cpp
deleted file mode 100644 (file)
index 8c83242..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2008 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. ``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
- * 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 "JSCustomPositionCallback.h"
-
-#if ENABLE(GEOLOCATION)
-
-#include "Frame.h"
-#include "JSGeoposition.h"
-#include <runtime/JSLock.h>
-
-namespace WebCore {
-
-using namespace JSC;
-
-JSCustomPositionCallback::JSCustomPositionCallback(JSObject* callback, JSDOMGlobalObject* globalObject)
-    : PositionCallback(globalObject->scriptExecutionContext())
-    , m_data(callback, globalObject)
-{
-}
-
-void JSCustomPositionCallback::handleEvent(Geoposition* geoposition)
-{
-    // ActiveDOMObject will null our pointer to the ScriptExecutionContext when it goes away.
-    if (!scriptExecutionContext())
-        return;
-
-    RefPtr<JSCustomPositionCallback> protect(this);
-
-    JSC::JSLock lock(SilenceAssertionsOnly);
-    ExecState* exec = m_data.globalObject()->globalExec();
-    MarkedArgumentBuffer args;
-    args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), geoposition));
-    m_data.invokeCallback(args);
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(GEOLOCATION)
diff --git a/Source/WebCore/bindings/js/JSCustomPositionCallback.h b/Source/WebCore/bindings/js/JSCustomPositionCallback.h
deleted file mode 100644 (file)
index ad5528d..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2008 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. ``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
- * 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 JSCustomPositionCallback_h
-#define JSCustomPositionCallback_h
-
-#include "JSCallbackData.h"
-#include "PositionCallback.h"
-#include <wtf/Forward.h>
-
-namespace WebCore {
-
-class Geoposition;
-class JSDOMGlobalObject;
-
-class JSCustomPositionCallback : public PositionCallback {
-public:
-    static PassRefPtr<JSCustomPositionCallback> create(JSC::JSObject* callback, JSDOMGlobalObject* globalObject)
-    {
-        return adoptRef(new JSCustomPositionCallback(callback, globalObject));
-    }
-    
-private:
-    JSCustomPositionCallback(JSC::JSObject* callback, JSDOMGlobalObject*);
-
-    virtual void handleEvent(Geoposition*);
-    
-    JSCallbackData m_data;
-};
-    
-} // namespace WebCore
-
-#endif // JSCustomPositionCallback_h
diff --git a/Source/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp b/Source/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp
deleted file mode 100644 (file)
index 5711688..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2008 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. ``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
- * 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 "JSCustomPositionErrorCallback.h"
-
-#if ENABLE(GEOLOCATION)
-
-#include "Frame.h"
-#include "JSPositionError.h"
-#include <runtime/JSLock.h>
-
-namespace WebCore {
-    
-using namespace JSC;
-
-JSCustomPositionErrorCallback::JSCustomPositionErrorCallback(JSObject* callback, JSDOMGlobalObject* globalObject)
-    : PositionErrorCallback(globalObject->scriptExecutionContext())
-    , m_data(callback, globalObject)
-{
-}
-
-void JSCustomPositionErrorCallback::handleEvent(PositionError* positionError)
-{
-    // ActiveDOMObject will null our pointer to the ScriptExecutionContext when it goes away.
-    if (!scriptExecutionContext())
-        return;
-
-    RefPtr<JSCustomPositionErrorCallback> protect(this);
-
-    JSC::JSLock lock(SilenceAssertionsOnly);
-    ExecState* exec = m_data.globalObject()->globalExec();
-    MarkedArgumentBuffer args;
-    args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), positionError));
-    
-    m_data.invokeCallback(args);
-}
-    
-} // namespace WebCore
-
-#endif // ENABLE(GEOLOCATION)
diff --git a/Source/WebCore/bindings/js/JSCustomPositionErrorCallback.h b/Source/WebCore/bindings/js/JSCustomPositionErrorCallback.h
deleted file mode 100644 (file)
index 59328ca..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2008 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. ``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
- * 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 JSCustomPositionErrorCallback_h
-#define JSCustomPositionErrorCallback_h
-
-#include "JSCallbackData.h"
-#include "PositionErrorCallback.h"
-#include <wtf/Forward.h>
-
-namespace WebCore {
-    
-class PositionError;
-
-class JSCustomPositionErrorCallback : public PositionErrorCallback {
-public:
-    static PassRefPtr<JSCustomPositionErrorCallback> create(JSC::JSObject* callback, JSDOMGlobalObject* globalObject)
-    {
-        return adoptRef(new JSCustomPositionErrorCallback(callback, globalObject));
-    }
-    
-private:
-    JSCustomPositionErrorCallback(JSC::JSObject* callback, JSDOMGlobalObject* globalObject);
-    virtual void handleEvent(PositionError*);
-    
-    JSCallbackData m_data;
-};
-    
-} // namespace WebCore
-
-#endif // JSCustomPositionErrorCallback_h
index b93c4ce..7e11d5b 100644 (file)
@@ -31,9 +31,9 @@
 #include "CallbackFunction.h"
 #include "DOMWindow.h"
 #include "Geolocation.h"
-#include "JSCustomPositionCallback.h"
-#include "JSCustomPositionErrorCallback.h"
 #include "JSDOMWindow.h"
+#include "JSPositionCallback.h"
+#include "JSPositionErrorCallback.h"
 #include "PositionOptions.h"
 
 #if !ENABLE(CLIENT_BASED_GEOLOCATION)
@@ -113,12 +113,12 @@ JSValue JSGeolocation::getCurrentPosition(ExecState* exec)
 {
     // Arguments: PositionCallback, (optional)PositionErrorCallback, (optional)PositionOptions
 
-    RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<JSCustomPositionCallback>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument(0));
+    RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<JSPositionCallback>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument(0));
     if (exec->hadException())
         return jsUndefined();
     ASSERT(positionCallback);
 
-    RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<JSCustomPositionErrorCallback>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument(1), CallbackAllowUndefined | CallbackAllowNull);
+    RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<JSPositionErrorCallback>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument(1), CallbackAllowUndefined | CallbackAllowNull);
     if (exec->hadException())
         return jsUndefined();
 
@@ -135,12 +135,12 @@ JSValue JSGeolocation::watchPosition(ExecState* exec)
 {
     // Arguments: PositionCallback, (optional)PositionErrorCallback, (optional)PositionOptions
 
-    RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<JSCustomPositionCallback>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument(0));
+    RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<JSPositionCallback>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument(0));
     if (exec->hadException())
         return jsUndefined();
     ASSERT(positionCallback);
 
-    RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<JSCustomPositionErrorCallback>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument(1), CallbackAllowUndefined | CallbackAllowNull);
+    RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<JSPositionErrorCallback>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument(1), CallbackAllowUndefined | CallbackAllowNull);
     if (exec->hadException())
         return jsUndefined();
 
diff --git a/Source/WebCore/bindings/v8/custom/V8CustomPositionCallback.cpp b/Source/WebCore/bindings/v8/custom/V8CustomPositionCallback.cpp
deleted file mode 100644 (file)
index 97d0dde..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2009, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * 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 THE COPYRIGHT HOLDERS ``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 THE COPYRIGHT OWNER OR
- * 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 "V8CustomPositionCallback.h"
-
-#if ENABLE(GEOLOCATION)
-
-#include "ScriptExecutionContext.h"
-#include "V8CustomVoidCallback.h"  // For invokeCallback
-#include "V8Geoposition.h"
-#include "V8Proxy.h"
-
-namespace WebCore {
-
-V8CustomPositionCallback::V8CustomPositionCallback(v8::Local<v8::Object> callback, ScriptExecutionContext* context)
-    : PositionCallback(context)
-    , m_callback(v8::Persistent<v8::Object>::New(callback))
-{
-}
-
-V8CustomPositionCallback::~V8CustomPositionCallback()
-{
-    m_callback.Dispose();
-}
-
-void V8CustomPositionCallback::handleEvent(Geoposition* position)
-{
-    v8::HandleScope handleScope;
-
-    // ActiveDOMObject will null our pointer to the ScriptExecutionContext when it goes away.
-    ScriptExecutionContext* scriptContext = scriptExecutionContext();
-    if (!scriptContext)
-        return;
-
-    // The lookup of the proxy will fail if the Frame has been detached.
-    V8Proxy* proxy = V8Proxy::retrieve(scriptContext);
-    if (!proxy)
-        return;
-
-    v8::Handle<v8::Context> context = proxy->context();
-    if (context.IsEmpty())
-        return;
-
-    v8::Context::Scope scope(context);
-
-    v8::Handle<v8::Value> argv[] = {
-        toV8(position)
-    };
-
-    // Protect the script context until the callback returns.
-    RefPtr<ScriptExecutionContext> protector(scriptContext);
-
-    bool callbackReturnValue = false;
-    invokeCallback(m_callback, 1, argv, callbackReturnValue, scriptContext);
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(GEOLOCATION)
diff --git a/Source/WebCore/bindings/v8/custom/V8CustomPositionCallback.h b/Source/WebCore/bindings/v8/custom/V8CustomPositionCallback.h
deleted file mode 100644 (file)
index 61db922..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2009, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * 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 THE COPYRIGHT HOLDERS ``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 THE COPYRIGHT OWNER OR
- * 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 V8CustomPositionCallback_h
-#define V8CustomPositionCallback_h
-
-#include "PositionCallback.h"
-
-#include <v8.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-class Frame;
-class Geoposition;
-class ScriptExecutionContext;
-
-class V8CustomPositionCallback : public PositionCallback {
-public:
-    static PassRefPtr<V8CustomPositionCallback> create(v8::Local<v8::Value> value, ScriptExecutionContext* context)
-    {
-        ASSERT(value->IsObject());
-        return adoptRef(new V8CustomPositionCallback(value->ToObject(), context));
-    }
-    virtual ~V8CustomPositionCallback();
-
-    virtual void handleEvent(Geoposition*);
-
-private:
-    V8CustomPositionCallback(v8::Local<v8::Object>, ScriptExecutionContext*);
-
-    v8::Persistent<v8::Object> m_callback;
-};
-
-} // namespace WebCore
-
-#endif // V8CustomPositionCallback_h
diff --git a/Source/WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.cpp b/Source/WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.cpp
deleted file mode 100644 (file)
index 906a909..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2009, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * 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 THE COPYRIGHT HOLDERS ``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 THE COPYRIGHT OWNER OR
- * 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 "V8CustomPositionErrorCallback.h"
-
-#if ENABLE(GEOLOCATION)
-
-#include "ScriptExecutionContext.h"
-#include "V8CustomVoidCallback.h"  // For invokeCallback
-#include "V8PositionError.h"
-#include "V8Proxy.h"
-
-namespace WebCore {
-
-V8CustomPositionErrorCallback::V8CustomPositionErrorCallback(v8::Local<v8::Object> callback, ScriptExecutionContext* context)
-    : PositionErrorCallback(context)
-    , m_callback(v8::Persistent<v8::Object>::New(callback))
-{
-}
-
-V8CustomPositionErrorCallback::~V8CustomPositionErrorCallback()
-{
-    m_callback.Dispose();
-}
-
-void V8CustomPositionErrorCallback::handleEvent(PositionError* error)
-{
-    v8::HandleScope handleScope;
-
-    // ActiveDOMObject will null our pointer to the ScriptExecutionContext when it goes away.
-    ScriptExecutionContext* scriptContext = scriptExecutionContext();
-    if (!scriptContext)
-        return;
-
-    // The lookup of the proxy will fail if the Frame has been detached.
-    V8Proxy* proxy = V8Proxy::retrieve(scriptContext);
-    if (!proxy)
-        return;
-
-    v8::Handle<v8::Context> context = proxy->context();
-    if (context.IsEmpty())
-        return;
-
-    v8::Context::Scope scope(context);
-
-    v8::Handle<v8::Value> argv[] = {
-        toV8(error)
-    };
-
-    // Protect the script context until the callback returns.
-    RefPtr<ScriptExecutionContext> protector(scriptContext);
-
-    bool callbackReturnValue = false;
-    invokeCallback(m_callback, 1, argv, callbackReturnValue, scriptContext);
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(GEOLOCATION)
diff --git a/Source/WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.h b/Source/WebCore/bindings/v8/custom/V8CustomPositionErrorCallback.h
deleted file mode 100644 (file)
index 5211b60..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2009, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * 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 THE COPYRIGHT HOLDERS ``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 THE COPYRIGHT OWNER OR
- * 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 V8CustomPositionErrorCallback_h
-#define V8CustomPositionErrorCallback_h
-
-#include "PositionErrorCallback.h"
-
-#include <v8.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-class Frame;
-class PositionError;
-class ScriptExecutionContext;
-
-class V8CustomPositionErrorCallback : public PositionErrorCallback {
-public:
-    static PassRefPtr<V8CustomPositionErrorCallback> create(v8::Local<v8::Value> value, ScriptExecutionContext* context)
-    {
-        ASSERT(value->IsObject());
-        return adoptRef(new V8CustomPositionErrorCallback(value->ToObject(), context));
-    }
-    virtual ~V8CustomPositionErrorCallback();
-
-    virtual void handleEvent(PositionError*);
-
-private:
-    V8CustomPositionErrorCallback(v8::Local<v8::Object>, ScriptExecutionContext*);
-
-    v8::Persistent<v8::Object> m_callback;
-};
-
-} // namespace WebCore
-
-#endif // V8CustomPositionErrorCallback_h
index 91389d8..827cc3d 100644 (file)
@@ -31,8 +31,8 @@
 #include "Frame.h"
 #include "Geolocation.h"
 #include "V8Binding.h"
-#include "V8CustomPositionCallback.h"
-#include "V8CustomPositionErrorCallback.h"
+#include "V8PositionCallback.h"
+#include "V8PositionErrorCallback.h"
 #include "V8Utilities.h"
 
 using namespace std;
@@ -133,13 +133,13 @@ v8::Handle<v8::Value> V8Geolocation::getCurrentPositionCallback(const v8::Argume
 
     bool succeeded = false;
 
-    RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8CustomPositionCallback>(args[0], succeeded);
+    RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8PositionCallback>(args[0], succeeded);
     if (!succeeded)
         return v8::Undefined();
     ASSERT(positionCallback);
 
     // Argument is optional (hence undefined is allowed), and null is allowed.
-    RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8CustomPositionErrorCallback>(args[1], succeeded, CallbackAllowUndefined | CallbackAllowNull);
+    RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8PositionErrorCallback>(args[1], succeeded, CallbackAllowUndefined | CallbackAllowNull);
     if (!succeeded)
         return v8::Undefined();
 
@@ -159,13 +159,13 @@ v8::Handle<v8::Value> V8Geolocation::watchPositionCallback(const v8::Arguments&
 
     bool succeeded = false;
 
-    RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8CustomPositionCallback>(args[0], succeeded);
+    RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8PositionCallback>(args[0], succeeded);
     if (!succeeded)
         return v8::Undefined();
     ASSERT(positionCallback);
 
     // Argument is optional (hence undefined is allowed), and null is allowed.
-    RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8CustomPositionErrorCallback>(args[1], succeeded, CallbackAllowUndefined | CallbackAllowNull);
+    RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8PositionErrorCallback>(args[1], succeeded, CallbackAllowUndefined | CallbackAllowNull);
     if (!succeeded)
         return v8::Undefined();
 
index 5511d3e..09d7eb6 100644 (file)
 #ifndef PositionCallback_h
 #define PositionCallback_h
 
-#include "ActiveDOMObject.h"
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
-    
+
     class Geoposition;
-    
-    class PositionCallback : public RefCounted<PositionCallback>, public ActiveDOMObject {
+
+    class PositionCallback : public RefCounted<PositionCallback> {
     public:
-        PositionCallback(ScriptExecutionContext* context) : ActiveDOMObject(context, this) { }
         virtual ~PositionCallback() { }
-        virtual void handleEvent(Geoposition*) = 0;
+        virtual bool handleEvent(Geoposition*) = 0;
     };
-    
+
 } // namespace WebCore
 
 #endif // PositionCallback_h
diff --git a/Source/WebCore/page/PositionCallback.idl b/Source/WebCore/page/PositionCallback.idl
new file mode 100644 (file)
index 0000000..6d10c43
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2011 Google 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.
+ */
+
+module core {
+    interface [
+        Conditional=GEOLOCATION,
+        Callback=FunctionOnly
+    ] PositionCallback {
+        boolean handleEvent(in Geoposition position);
+    };
+}
index a65e350..d152785 100644 (file)
 #ifndef PositionErrorCallback_h
 #define PositionErrorCallback_h
 
-#include "ActiveDOMObject.h"
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
 
     class PositionError;
 
-    class PositionErrorCallback : public RefCounted<PositionErrorCallback>, public ActiveDOMObject {
+    class PositionErrorCallback : public RefCounted<PositionErrorCallback> {
     public:
-        PositionErrorCallback(ScriptExecutionContext* context) : ActiveDOMObject(context, this) { }
         virtual ~PositionErrorCallback() { }
-        virtual void handleEvent(PositionError*) = 0;
+        virtual bool handleEvent(PositionError*) = 0;
     };
-    
+
 } // namespace WebCore
 
 #endif // PositionErrorCallback_h
diff --git a/Source/WebCore/page/PositionErrorCallback.idl b/Source/WebCore/page/PositionErrorCallback.idl
new file mode 100644 (file)
index 0000000..32099f9
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2011 Google 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.
+ */
+
+module core {
+    interface [
+        Conditional=GEOLOCATION,
+        Callback=FunctionOnly
+    ] PositionErrorCallback {
+        boolean handleEvent(in PositionError error);
+    };
+}