2011-01-10 John Knottenbelt <jknotten@chromium.org>
authorjorlow@chromium.org <jorlow@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Jan 2011 11:41:44 +0000 (11:41 +0000)
committerjorlow@chromium.org <jorlow@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Jan 2011 11:41:44 +0000 (11:41 +0000)
        Reviewed by Jeremy Orlow.

        [Chromium] Remove non-client-based Geolocation code
        https://bugs.webkit.org/show_bug.cgi?id=50921

        Code clean up, covered by existing tests.

        * WebCore.gyp/WebCore.gyp:
        * WebCore.gypi:
        * platform/chromium/ChromiumBridge.h:
        * platform/chromium/GeolocationServiceChromium.cpp: Removed.
        * platform/chromium/GeolocationServiceChromium.h: Removed.
2011-01-10  John Knottenbelt  <jknotten@chromium.org>

        Reviewed by Jeremy Orlow.

        [Chromium] Remove non-client-based Geolocation code
        https://bugs.webkit.org/show_bug.cgi?id=50921

        * DumpRenderTree/chromium/LayoutTestController.cpp:
        (LayoutTestController::setGeolocationPermission):
        (LayoutTestController::setMockGeolocationPosition):
        (LayoutTestController::setMockGeolocationError):
        * DumpRenderTree/chromium/WebViewHost.cpp:
        (WebViewHost::geolocationClientMock):
        (WebViewHost::reset):
        * DumpRenderTree/chromium/WebViewHost.h:
2011-01-10  John Knottenbelt  <jknotten@chromium.org>

        Reviewed by Jeremy Orlow.

        [Chromium] Remove non-client-based Geolocation code
        https://bugs.webkit.org/show_bug.cgi?id=50921

        * WebKit.gyp:
        * public/WebGeolocationService.h: Removed.
        * public/WebGeolocationServiceBridge.h: Removed.
        * public/WebGeolocationServiceMock.h: Removed.
        * src/AssertMatchingEnums.cpp:
        * src/ChromeClientImpl.cpp:
        (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame):
        (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame):
        * src/ChromiumBridge.cpp:
        * src/WebGeolocationServiceBridgeImpl.cpp: Removed.
        * src/WebGeolocationServiceBridgeImpl.h: Removed.
        * src/WebGeolocationServiceMock.cpp: Removed.
        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::WebViewImpl):
        * src/WebViewImpl.h:

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

23 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/WebCore.gypi
Source/WebCore/platform/chromium/ChromiumBridge.h
Source/WebCore/platform/chromium/GeolocationServiceChromium.cpp [deleted file]
Source/WebCore/platform/chromium/GeolocationServiceChromium.h [deleted file]
Tools/ChangeLog
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/WebViewHost.cpp
Tools/DumpRenderTree/chromium/WebViewHost.h
WebKit/chromium/ChangeLog
WebKit/chromium/WebKit.gyp
WebKit/chromium/public/WebGeolocationService.h [deleted file]
WebKit/chromium/public/WebGeolocationServiceBridge.h [deleted file]
WebKit/chromium/public/WebGeolocationServiceMock.h [deleted file]
WebKit/chromium/src/AssertMatchingEnums.cpp
WebKit/chromium/src/ChromeClientImpl.cpp
WebKit/chromium/src/ChromiumBridge.cpp
WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp [deleted file]
WebKit/chromium/src/WebGeolocationServiceBridgeImpl.h [deleted file]
WebKit/chromium/src/WebGeolocationServiceMock.cpp [deleted file]
WebKit/chromium/src/WebViewImpl.cpp
WebKit/chromium/src/WebViewImpl.h

index f3326bc..3af242e 100644 (file)
@@ -1,3 +1,18 @@
+2011-01-10  John Knottenbelt  <jknotten@chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        [Chromium] Remove non-client-based Geolocation code
+        https://bugs.webkit.org/show_bug.cgi?id=50921
+
+        Code clean up, covered by existing tests.
+
+        * WebCore.gyp/WebCore.gyp:
+        * WebCore.gypi:
+        * platform/chromium/ChromiumBridge.h:
+        * platform/chromium/GeolocationServiceChromium.cpp: Removed.
+        * platform/chromium/GeolocationServiceChromium.h: Removed.
+
 2011-01-10  Ilya Tikhonovsky  <loislo@chromium.org>
 
         Reviewed by Pavel Feldman.
index 2cd5169..b800cf3 100644 (file)
             ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$']
           ],
         }],
-        ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
-          'sources/': [
-            ['exclude', '/GeolocationService.*$'],
-          ],
-        }],
         ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
           'sources/': [
             ['include', 'platform/audio/mkl/FFTFrameMKL\\.cpp$'],
index 337cb5a..83e55d4 100644 (file)
             'platform/chromium/FramelessScrollView.cpp',
             'platform/chromium/FramelessScrollView.h',
             'platform/chromium/FramelessScrollViewClient.h',
-            'platform/chromium/GeolocationServiceChromium.cpp',
-            'platform/chromium/GeolocationServiceChromium.h',
             'platform/chromium/KeyCodeConversion.h',
             'platform/chromium/KeyCodeConversionGtk.cpp',
             'platform/chromium/LanguageChromium.cpp',
index 56969ef..d3b8528 100644 (file)
@@ -159,10 +159,6 @@ namespace WebCore {
         // Forms --------------------------------------------------------------
         static void notifyFormStateChanged(const Document*);
 
-#if !ENABLE(CLIENT_BASED_GEOLOCATION)
-        // Geolocation --------------------------------------------------------
-        static GeolocationServiceBridge* createGeolocationServiceBridge(GeolocationServiceChromium*);
-#endif
         // Databases ----------------------------------------------------------
         // Returns a handle to the DB file and ooptionally a handle to its containing directory
         static PlatformFileHandle databaseOpenFile(const String& vfsFleName, int desiredFlags);
diff --git a/Source/WebCore/platform/chromium/GeolocationServiceChromium.cpp b/Source/WebCore/platform/chromium/GeolocationServiceChromium.cpp
deleted file mode 100644 (file)
index c5e73ae..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2010, 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:
- *
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 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 "GeolocationServiceChromium.h"
-
-#include "ChromiumBridge.h"
-
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
-#error "This file should not be compiled when ENABLE(CLIENT_BASED_GEOLOCATION)"
-#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
-
-namespace WebCore {
-
-GeolocationServiceBridge::~GeolocationServiceBridge()
-{
-}
-
-GeolocationServiceChromium::GeolocationServiceChromium(GeolocationServiceClient* c)
-        : GeolocationService(c),
-          m_geolocation(static_cast<Geolocation*>(c)),
-          m_geolocationServiceBridge(ChromiumBridge::createGeolocationServiceBridge(this)),
-          m_lastError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ""))
-{
-}
-
-void GeolocationServiceChromium::setIsAllowed(bool allowed)
-{
-    m_geolocation->setIsAllowed(allowed);
-}
-
-void GeolocationServiceChromium::setLastPosition(PassRefPtr<Geoposition> geoposition)
-{
-    m_lastPosition = geoposition;
-    positionChanged();
-}
-
-void GeolocationServiceChromium::setLastError(int errorCode, const String& message)
-{
-    m_lastError = PositionError::create(static_cast<PositionError::ErrorCode>(errorCode), message);
-    errorOccurred();
-}
-
-Frame* GeolocationServiceChromium::frame()
-{
-    return m_geolocation->frame();
-}
-
-bool GeolocationServiceChromium::startUpdating(PositionOptions* options)
-{
-    return m_geolocationServiceBridge->startUpdating(options);
-}
-
-void GeolocationServiceChromium::stopUpdating()
-{
-    return m_geolocationServiceBridge->stopUpdating();
-}
-
-void GeolocationServiceChromium::suspend()
-{
-    return m_geolocationServiceBridge->suspend();
-}
-
-void GeolocationServiceChromium::resume()
-{
-    return m_geolocationServiceBridge->resume();
-}
-
-Geoposition* GeolocationServiceChromium::lastPosition() const
-{
-    return m_lastPosition.get();
-}
-
-PositionError* GeolocationServiceChromium::lastError() const
-{
-    return m_lastError.get();
-}
-
-static GeolocationService* createGeolocationServiceChromium(GeolocationServiceClient* c)
-{
-    return new GeolocationServiceChromium(c);
-}
-
-// Sets up the factory function for GeolocationService.
-GeolocationService::FactoryFunction* GeolocationService::s_factoryFunction = &createGeolocationServiceChromium;
-
-} // namespace WebCore
diff --git a/Source/WebCore/platform/chromium/GeolocationServiceChromium.h b/Source/WebCore/platform/chromium/GeolocationServiceChromium.h
deleted file mode 100644 (file)
index 7e6f633..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2010, 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:
- *
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 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 GeolocationServiceChromium_h
-#define GeolocationServiceChromium_h
-
-#include "Geolocation.h"
-#include "GeolocationService.h"
-#include "Geoposition.h"
-#include "PlatformString.h"
-#include "PositionError.h"
-
-namespace WebCore {
-
-// Provides an interface for GeolocationServiceChromium to call into the embedder.
-class GeolocationServiceBridge {
-public:
-    virtual ~GeolocationServiceBridge();
-    // Called by GeolocationServiceChromium.
-    virtual bool startUpdating(PositionOptions*) = 0;
-    virtual void stopUpdating() = 0;
-    virtual void suspend() = 0;
-    virtual void resume() = 0;
-
-    // Called by the embedder, to identify this bridge.
-    virtual int getBridgeId() const = 0;
-    virtual void attachBridgeIfNeeded() = 0;
-};
-
-// This class extends GeolocationService, and uses GeolocationServiceBridge to
-// call into the embedder, as well as provides a few extra methods so that the
-// embedder can notify permission, position, error, etc.
-class GeolocationServiceChromium : public GeolocationService {
-public:
-    explicit GeolocationServiceChromium(GeolocationServiceClient*);
-
-    GeolocationServiceBridge* geolocationServiceBridge() const { return m_geolocationServiceBridge.get(); }
-    void setIsAllowed(bool allowed);
-    void setLastPosition(PassRefPtr<Geoposition>);
-    void setLastError(int errorCode, const String& message);
-    Frame* frame();
-
-    // From GeolocationService.
-    virtual bool startUpdating(PositionOptions*);
-    virtual void stopUpdating();
-    virtual void suspend();
-    virtual void resume();
-    virtual Geoposition* lastPosition() const;
-    virtual PositionError* lastError() const;
-
-private:
-    Geolocation* m_geolocation;
-    OwnPtr<GeolocationServiceBridge> m_geolocationServiceBridge;
-    RefPtr<Geoposition> m_lastPosition;
-    RefPtr<PositionError> m_lastError;
-};
-
-} // namespace WebCore
-
-#endif // GeolocationServiceChromium_h
index 0e77220..2943b92 100644 (file)
@@ -1,3 +1,19 @@
+2011-01-10  John Knottenbelt  <jknotten@chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        [Chromium] Remove non-client-based Geolocation code
+        https://bugs.webkit.org/show_bug.cgi?id=50921
+
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::setGeolocationPermission):
+        (LayoutTestController::setMockGeolocationPosition):
+        (LayoutTestController::setMockGeolocationError):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::geolocationClientMock):
+        (WebViewHost::reset):
+        * DumpRenderTree/chromium/WebViewHost.h:
+
 2011-01-10  Eric Seidel  <eric@webkit.org>
 
         Reviewed by Adam Barth.
index 83e2389..0b2cfc9 100644 (file)
 #include "WebDocument.h"
 #include "WebElement.h"
 #include "WebFrame.h"
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
 #include "WebGeolocationClientMock.h"
-#else
-#include "WebGeolocationServiceMock.h"
-#endif
 #include "WebInputElement.h"
 #include "WebKit.h"
 #include "WebNotificationPresenter.h"
@@ -1524,11 +1520,7 @@ void LayoutTestController::setGeolocationPermission(const CppArgumentList& argum
     result->setNull();
     if (arguments.size() < 1 || !arguments[0].isBool())
         return;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     m_shell->webViewHost()->geolocationClientMock()->setPermission(arguments[0].toBoolean());
-#else
-    WebGeolocationServiceMock::setMockGeolocationPermission(arguments[0].toBoolean());
-#endif
 }
 
 void LayoutTestController::setMockGeolocationPosition(const CppArgumentList& arguments, CppVariant* result)
@@ -1536,11 +1528,7 @@ void LayoutTestController::setMockGeolocationPosition(const CppArgumentList& arg
     result->setNull();
     if (arguments.size() < 3 || !arguments[0].isNumber() || !arguments[1].isNumber() || !arguments[2].isNumber())
         return;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     m_shell->webViewHost()->geolocationClientMock()->setPosition(arguments[0].toDouble(), arguments[1].toDouble(), arguments[2].toDouble());
-#else
-    WebGeolocationServiceMock::setMockGeolocationPosition(arguments[0].toDouble(), arguments[1].toDouble(), arguments[2].toDouble());
-#endif
 }
 
 void LayoutTestController::setMockGeolocationError(const CppArgumentList& arguments, CppVariant* result)
@@ -1548,11 +1536,7 @@ void LayoutTestController::setMockGeolocationError(const CppArgumentList& argume
     result->setNull();
     if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isString())
         return;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     m_shell->webViewHost()->geolocationClientMock()->setError(arguments[0].toInt32(), cppVariantToWebString(arguments[1]));
-#else
-    WebGeolocationServiceMock::setMockGeolocationError(arguments[0].toInt32(), cppVariantToWebString(arguments[1]));
-#endif
 }
 
 void LayoutTestController::abortModal(const CppArgumentList& arguments, CppVariant* result)
index 849312c..f5dd7fd 100644 (file)
 #include "WebDragData.h"
 #include "WebElement.h"
 #include "WebFrame.h"
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
 #include "WebGeolocationClientMock.h"
-#else
-#include "WebGeolocationServiceMock.h"
-#endif
 #include "WebHistoryItem.h"
 #include "WebNode.h"
 #include "WebRange.h"
@@ -571,7 +567,6 @@ WebNotificationPresenter* WebViewHost::notificationPresenter()
     return m_shell->notificationPresenter();
 }
 
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
 WebKit::WebGeolocationClient* WebViewHost::geolocationClient()
 {
     return geolocationClientMock();
@@ -583,14 +578,6 @@ WebKit::WebGeolocationClientMock* WebViewHost::geolocationClientMock()
         m_geolocationClientMock.set(WebGeolocationClientMock::create());
     return m_geolocationClientMock.get();
 }
-#else
-WebKit::WebGeolocationService* WebViewHost::geolocationService()
-{
-    if (!m_geolocationServiceMock)
-        m_geolocationServiceMock.set(WebGeolocationServiceMock::createWebGeolocationServiceMock());
-    return m_geolocationServiceMock.get();
-}
-#endif
 
 WebSpeechInputController* WebViewHost::speechInputController(WebKit::WebSpeechInputListener* listener)
 {
@@ -1177,12 +1164,8 @@ void WebViewHost::reset()
     m_editCommandName.clear();
     m_editCommandValue.clear();
 
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     if (m_geolocationClientMock.get())
         m_geolocationClientMock->resetMock();
-#else
-    m_geolocationServiceMock.clear();
-#endif
 
     if (m_speechInputControllerMock.get())
         m_speechInputControllerMock->clearResults();
index 20b29c0..86c23a5 100644 (file)
@@ -139,11 +139,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
     virtual int historyForwardListCount();
     virtual void postAccessibilityNotification(const WebKit::WebAccessibilityObject&, WebKit::WebAccessibilityNotification);
     virtual WebKit::WebNotificationPresenter* notificationPresenter();
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     virtual WebKit::WebGeolocationClient* geolocationClient();
-#else
-    virtual WebKit::WebGeolocationService* geolocationService();
-#endif
     virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*);
     virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient();
 
@@ -210,10 +206,8 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
     WebKit::WebDeviceOrientationClientMock* deviceOrientationClientMock();
     MockSpellCheck* mockSpellCheck();
 
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     // Geolocation client mocks for LayoutTestController
     WebKit::WebGeolocationClientMock* geolocationClientMock();
-#endif
 
 private:
     LayoutTestController* layoutTestController() const;
@@ -317,11 +311,7 @@ private:
     OwnPtr<WebKit::WebContextMenuData> m_lastContextMenuData;
 
     // Geolocation
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     OwnPtr<WebKit::WebGeolocationClientMock> m_geolocationClientMock;
-#else
-    OwnPtr<WebKit::WebGeolocationServiceMock> m_geolocationServiceMock;
-#endif
 
     OwnPtr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationClientMock;
     OwnPtr<WebKit::WebSpeechInputControllerMock> m_speechInputControllerMock;
index 410ded3..a85bc15 100644 (file)
@@ -1,3 +1,26 @@
+2011-01-10  John Knottenbelt  <jknotten@chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        [Chromium] Remove non-client-based Geolocation code
+        https://bugs.webkit.org/show_bug.cgi?id=50921
+
+        * WebKit.gyp:
+        * public/WebGeolocationService.h: Removed.
+        * public/WebGeolocationServiceBridge.h: Removed.
+        * public/WebGeolocationServiceMock.h: Removed.
+        * src/AssertMatchingEnums.cpp:
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame):
+        (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame):
+        * src/ChromiumBridge.cpp:
+        * src/WebGeolocationServiceBridgeImpl.cpp: Removed.
+        * src/WebGeolocationServiceBridgeImpl.h: Removed.
+        * src/WebGeolocationServiceMock.cpp: Removed.
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::WebViewImpl):
+        * src/WebViewImpl.h:
+
 2011-01-09  Johnny Ding  <jnd@chromium.org>
 
         Unreviewed, fix Chromium windows compilation error according to James Robinson's report.
index 9385778..de99b83 100644 (file)
                 'public/WebGeolocationPermissionRequest.h',
                 'public/WebGeolocationPermissionRequestManager.h',
                 'public/WebGeolocationPosition.h',
-                'public/WebGeolocationService.h',
-                'public/WebGeolocationServiceBridge.h',
-                'public/WebGeolocationServiceMock.h',
                 'public/WebGlyphCache.h',
                 'public/WebGraphicsContext3D.h',
                 'public/WebHistoryItem.h',
                 'src/WebGeolocationPermissionRequest.cpp',
                 'src/WebGeolocationPermissionRequestManager.cpp',
                 'src/WebGeolocationPosition.cpp',
-                'src/WebGeolocationServiceBridgeImpl.cpp',
-                'src/WebGeolocationServiceBridgeImpl.h',
-                'src/WebGeolocationServiceMock.cpp',
                 'src/WebGlyphCache.cpp',
                 'src/WebGraphicsContext3D.cpp',
                 'src/WebGraphicsContext3DDefaultImpl.cpp',
                         }],
                     ],
                 }],
-                ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
-                    'sources/': [
-                        ['exclude', 'WebGeolocationService.*$'],
-                    ],
-                }, {
-                   'sources/': [
-                        ['exclude', 'GeolocationClientProxy.*'],
-                        ['exclude', 'WebGeolocationClient.*'],
-                        ['exclude', 'WebGeolocationController.*'],
-                        ['exclude', 'WebGeolocationError.*'],
-                        ['exclude', 'WebGeolocationPermissionRequest.*'],
-                        ['exclude', 'WebGeolocationPosition.*'],
-                   ],
-                }]
             ],
         },
 
                         },
                     },
                 }],
-                ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
-                    'sources/': [
-                        ['exclude', 'WebGeolocationService.*$'],
-                    ],
-                }]
             ],
         },
         {
diff --git a/WebKit/chromium/public/WebGeolocationService.h b/WebKit/chromium/public/WebGeolocationService.h
deleted file mode 100644 (file)
index ea91b58..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2010, 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:
- *
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 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 WebGeolocationService_h
-#define WebGeolocationService_h
-
-namespace WebKit {
-
-class WebGeolocationServiceBridge;
-class WebString;
-class WebURL;
-
-// Provides an embedder API called by WebKit.
-class WebGeolocationService {
-public:
-    virtual void requestPermissionForFrame(int bridgeId, const WebURL& url) { }
-    virtual void cancelPermissionRequestForFrame(int bridgeId, const WebURL&) { }
-    virtual void startUpdating(int bridgeId, const WebURL& url, bool enableHighAccuracy) { }
-    virtual void stopUpdating(int bridgeId) { }
-    virtual void suspend(int bridgeId) { }
-    virtual void resume(int bridgeId) { }
-
-    // Attaches the WebGeolocationServiceBridge to the embedder and returns its
-    // id, which should be used on subsequent calls for the methods above.
-    // An ID of zero indicates the attach failed.
-    virtual int attachBridge(WebGeolocationServiceBridge*) { return 0; }
-
-    // Detaches the WebGeolocationServiceBridge from the embedder.
-    virtual void detachBridge(int bridgeId) { }
-
-protected:
-    virtual ~WebGeolocationService() {}
-};
-
-} // namespace WebKit
-
-#endif // WebGeolocationService_h
diff --git a/WebKit/chromium/public/WebGeolocationServiceBridge.h b/WebKit/chromium/public/WebGeolocationServiceBridge.h
deleted file mode 100644 (file)
index d209c23..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2010, 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:
- *
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 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 WebGeolocationServiceBridge_h
-#define WebGeolocationServiceBridge_h
-
-namespace WebCore {
-class GeolocationServiceBridge;
-class GeolocationServiceChromium;
-}
-
-namespace WebKit {
-
-class WebString;
-class WebURL;
-
-// Provides a WebKit API called by the embedder.
-class WebGeolocationServiceBridge {
-public:
-    virtual void setIsAllowed(bool allowed) = 0;
-    virtual void setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp) = 0;
-    virtual void setLastError(int errorCode, const WebString& message) = 0;
-    // Called when the WebGeolocationService to which this bridge is attached is going out of scope. On receiving
-    // this call the bridge implementation must not make any further access to the service.
-    virtual void didDestroyGeolocationService() = 0;
-    // FIXME: Remove this badly named method when all callers are using didDestroyGeolocationService directly.
-    void onWebGeolocationServiceDestroyed() { didDestroyGeolocationService(); }
-
-protected:
-    virtual ~WebGeolocationServiceBridge() {}
-};
-
-} // namespace WebKit
-
-#endif // WebGeolocationServiceBridge_h
diff --git a/WebKit/chromium/public/WebGeolocationServiceMock.h b/WebKit/chromium/public/WebGeolocationServiceMock.h
deleted file mode 100644 (file)
index 820975e..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2010, 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:
- *
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 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 WebGeolocationServiceMock_h
-#define WebGeolocationServiceMock_h
-
-#include "WebCommon.h"
-#include "WebGeolocationService.h"
-
-namespace WebKit {
-
-class WebString;
-
-class WebGeolocationServiceMock : public WebGeolocationService {
-public:
-    WEBKIT_API static WebGeolocationServiceMock* createWebGeolocationServiceMock();
-    WEBKIT_API static void setMockGeolocationPermission(bool allowed);
-    WEBKIT_API static void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
-    WEBKIT_API static void setMockGeolocationError(int errorCode, const WebString& message);
-};
-
-} // namespace WebKit
-
-#endif // WebGeolocationServiceMock_h
index 936b8db..e1ee4a1 100644 (file)
@@ -394,10 +394,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorQuotaExceeded, FileError::QUOTA_EXCEEDE
 COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorTypeMismatch, FileError::TYPE_MISMATCH_ERR);
 COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorPathExists, FileError::PATH_EXISTS_ERR);
 
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
 COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPermissionDenied, GeolocationError::PermissionDenied);
 COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPositionUnavailable, GeolocationError::PositionUnavailable);
-#endif
 
 #if OS(DARWIN)
 COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateDisabled, ChromiumBridge::StateDisabled);
index 2bf4b7a..1a984c1 100644 (file)
@@ -47,7 +47,6 @@
 #include "FrameView.h"
 #include "Geolocation.h"
 #include "GeolocationService.h"
-#include "GeolocationServiceChromium.h"
 #include "GraphicsLayer.h"
 #include "HTMLNames.h"
 #include "HitTestResult.h"
@@ -71,7 +70,6 @@
 #include "WebFileChooserCompletionImpl.h"
 #include "WebFrameClient.h"
 #include "WebFrameImpl.h"
-#include "WebGeolocationService.h"
 #include "WebInputEvent.h"
 #include "WebKit.h"
 #include "WebNode.h"
@@ -778,19 +776,12 @@ NotificationPresenter* ChromeClientImpl::notificationPresenter() const
 // (see https://bugs.webkit.org/show_bug.cgi?id=50061 ).
 void ChromeClientImpl::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
 {
-#if !ENABLE(CLIENT_BASED_GEOLOCATION)
-    GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService());
-    geolocationService->geolocationServiceBridge()->attachBridgeIfNeeded();
-    m_webView->client()->geolocationService()->requestPermissionForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url());
-#endif
+    ASSERT_NOT_REACHED();
 }
 
 void ChromeClientImpl::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation)
 {
-#if !ENABLE(CLIENT_BASED_GEOLOCATION)
-    GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService());
-    m_webView->client()->geolocationService()->cancelPermissionRequestForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url());
-#endif
+    ASSERT_NOT_REACHED();
 }
 
 #if USE(ACCELERATED_COMPOSITING)
index 38a3f1d..e16025c 100644 (file)
 #include "PluginData.h"
 #include "SharedBuffer.h"
 
-#if !ENABLE(CLIENT_BASED_GEOLOCATION)
-#include "WebGeolocationServiceBridgeImpl.h"
-#endif
-
 #include "Worker.h"
 #include "WorkerContextProxy.h"
 #include <wtf/Assertions.h>
@@ -483,15 +479,6 @@ bool ChromiumBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* out)
 }
 #endif
 
-#if !ENABLE(CLIENT_BASED_GEOLOCATION)
-// Geolocation ----------------------------------------------------------------
-
-GeolocationServiceBridge* ChromiumBridge::createGeolocationServiceBridge(GeolocationServiceChromium* geolocationServiceChromium)
-{
-    return createGeolocationServiceBridgeImpl(geolocationServiceChromium);
-}
-#endif
-
 // Databases ------------------------------------------------------------------
 
 PlatformFileHandle ChromiumBridge::databaseOpenFile(const String& vfsFileName, int desiredFlags)
diff --git a/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp b/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp
deleted file mode 100644 (file)
index bbc852f..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (C) 2010 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:
- *
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 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 "WebGeolocationServiceBridgeImpl.h"
-
-#include "Chrome.h"
-#include "ChromeClientImpl.h"
-#include "Frame.h"
-#include "Geolocation.h"
-#include "GeolocationServiceChromium.h"
-#include "Geoposition.h"
-#include "Page.h"
-#include "PositionError.h"
-#include "PositionOptions.h"
-#include "WebFrame.h"
-#include "WebFrameImpl.h"
-#include "WebGeolocationService.h"
-#include "WebGeolocationServiceBridge.h"
-#include "WebViewClient.h"
-#include "WebViewImpl.h"
-
-#if ENABLE(GEOLOCATION)
-
-using WebCore::Coordinates;
-using WebCore::Frame;
-using WebCore::Geolocation;
-using WebCore::GeolocationServiceBridge;
-using WebCore::GeolocationServiceChromium;
-using WebCore::GeolocationServiceClient;
-using WebCore::Geoposition;
-using WebCore::PositionError;
-using WebCore::PositionOptions;
-using WTF::String;
-
-namespace WebKit {
-
-class WebGeolocationServiceBridgeImpl : public GeolocationServiceBridge, public WebGeolocationServiceBridge {
-public:
-    explicit WebGeolocationServiceBridgeImpl(GeolocationServiceChromium*);
-    virtual ~WebGeolocationServiceBridgeImpl();
-
-    // GeolocationServiceBridge
-    virtual bool startUpdating(PositionOptions*);
-    virtual void stopUpdating();
-    virtual void suspend();
-    virtual void resume();
-    virtual int getBridgeId() const;
-    virtual void attachBridgeIfNeeded();
-
-    // WebGeolocationServiceBridge
-    virtual void setIsAllowed(bool allowed);
-    virtual void setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp);
-    virtual void setLastError(int errorCode, const WebString& message);
-    virtual void didDestroyGeolocationService();
-
-private:
-    bool isAttached() const;
-    // Pointer back to the WebKit geolocation client. We obtain this via the frame's page, but need to cache it
-    // as it may still be alive after the page has detached from the frame.
-    WebGeolocationService* m_webGeolocationService;
-    // GeolocationServiceChromium owns us, we only have a pointer back to it.
-    GeolocationServiceChromium* m_geolocationServiceChromium;
-    int m_bridgeId;
-};
-
-GeolocationServiceBridge* createGeolocationServiceBridgeImpl(GeolocationServiceChromium* geolocationServiceChromium)
-{
-    return new WebGeolocationServiceBridgeImpl(geolocationServiceChromium);
-}
-
-WebGeolocationServiceBridgeImpl::WebGeolocationServiceBridgeImpl(GeolocationServiceChromium* geolocationServiceChromium)
-    : m_webGeolocationService(0)
-    , m_geolocationServiceChromium(geolocationServiceChromium)
-    , m_bridgeId(0)
-{
-}
-
-WebGeolocationServiceBridgeImpl::~WebGeolocationServiceBridgeImpl()
-{
-    if (isAttached())
-        m_webGeolocationService->detachBridge(m_bridgeId);
-}
-
-bool WebGeolocationServiceBridgeImpl::startUpdating(PositionOptions* positionOptions)
-{
-    attachBridgeIfNeeded();
-    if (!isAttached())
-        return false;
-    m_webGeolocationService->startUpdating(m_bridgeId, m_geolocationServiceChromium->frame()->document()->url(), positionOptions->enableHighAccuracy());
-    return true;
-}
-
-void WebGeolocationServiceBridgeImpl::stopUpdating()
-{
-    if (isAttached()) {
-        m_webGeolocationService->stopUpdating(m_bridgeId);
-        m_webGeolocationService->detachBridge(m_bridgeId);
-        m_bridgeId = 0;
-        m_webGeolocationService = 0;
-    }
-}
-
-void WebGeolocationServiceBridgeImpl::suspend()
-{
-    if (isAttached())
-        m_webGeolocationService->suspend(m_bridgeId);
-}
-
-void WebGeolocationServiceBridgeImpl::resume()
-{
-    if (isAttached())
-        m_webGeolocationService->resume(m_bridgeId);
-}
-
-int WebGeolocationServiceBridgeImpl::getBridgeId() const
-{
-    return m_bridgeId;
-}
-
-void WebGeolocationServiceBridgeImpl::attachBridgeIfNeeded()
-{
-    if (isAttached())
-        return;
-    // Lazy attach to the geolocation service of the associated page if there is one.
-    Frame* frame = m_geolocationServiceChromium->frame();
-    if (!frame || !frame->page())
-        return;
-    WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(frame->page()->chrome()->client());
-    WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client();
-    m_webGeolocationService = webViewClient->geolocationService();
-    ASSERT(m_webGeolocationService);
-    m_bridgeId = m_webGeolocationService->attachBridge(this);
-    if (!m_bridgeId) {
-        // Attach failed. Release association with this service.
-        m_webGeolocationService = 0;
-    }
-}
-
-void WebGeolocationServiceBridgeImpl::setIsAllowed(bool allowed)
-{
-    m_geolocationServiceChromium->setIsAllowed(allowed);
-}
-
-void WebGeolocationServiceBridgeImpl::setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp)
-{
-    RefPtr<Geoposition> geoposition = Geoposition::create(Coordinates::create(latitude, longitude, providesAltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed), timestamp);
-    m_geolocationServiceChromium->setLastPosition(geoposition);
-}
-
-void WebGeolocationServiceBridgeImpl::setLastError(int errorCode, const WebString& message)
-{
-    m_geolocationServiceChromium->setLastError(errorCode, message);
-}
-
-void WebGeolocationServiceBridgeImpl::didDestroyGeolocationService()
-{
-    m_bridgeId = 0;
-    m_webGeolocationService = 0;
-}
-
-bool WebGeolocationServiceBridgeImpl::isAttached() const
-{
-    // Test the class invariant.
-    if (m_webGeolocationService)
-        ASSERT(m_bridgeId);
-    else
-        ASSERT(!m_bridgeId);
-
-    return m_webGeolocationService;
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(GEOLOCATION)
diff --git a/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.h b/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.h
deleted file mode 100644 (file)
index 2c37bcb..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2010, 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:
- *
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 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 WebGeolocationServiceBridgeImpl_h
-#define WebGeolocationServiceBridgeImpl_h
-
-namespace WebCore {
-class GeolocationServiceBridge;
-class GeolocationServiceChromium;
-}
-
-namespace WebKit {
-WebCore::GeolocationServiceBridge* createGeolocationServiceBridgeImpl(WebCore::GeolocationServiceChromium*);
-} // namespace WebKit
-
-#endif // WebGeolocationServiceBridgeImpl_h
diff --git a/WebKit/chromium/src/WebGeolocationServiceMock.cpp b/WebKit/chromium/src/WebGeolocationServiceMock.cpp
deleted file mode 100644 (file)
index 667b8b1..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright (C) 2010 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:
- *
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 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 "WebGeolocationServiceMock.h"
-
-#include "GeolocationService.h"
-#include "GeolocationServiceChromium.h"
-#include "GeolocationServiceMock.h"
-#include "WebGeolocationServiceBridge.h"
-#include "WebString.h"
-#include <wtf/CurrentTime.h>
-#include <wtf/HashMap.h>
-#include <wtf/Vector.h>
-
-#if ENABLE(GEOLOCATION)
-using WebCore::Coordinates;
-using WebCore::Frame;
-using WebCore::Geolocation;
-using WebCore::GeolocationServiceBridge;
-using WebCore::GeolocationServiceChromium;
-using WebCore::GeolocationServiceClient;
-using WebCore::GeolocationServiceMock;
-using WebCore::Geoposition;
-using WebCore::PositionError;
-using WebCore::PositionOptions;
-using WTF::String;
-using WTF::Vector;
-
-namespace WebCore {
-class GeolocationServiceChromiumMock : public GeolocationServiceChromium, public GeolocationServiceClient {
-public:
-    static GeolocationService* create(GeolocationServiceClient*);
-    virtual bool startUpdating(PositionOptions*);
-    virtual void stopUpdating();
-    virtual Geoposition* lastPosition() const;
-    virtual PositionError* lastError() const;
-
-    virtual void geolocationServicePositionChanged(GeolocationService*);
-    virtual void geolocationServiceErrorOccurred(GeolocationService*);
-
-private:
-    explicit GeolocationServiceChromiumMock(GeolocationServiceClient*);
-
-    GeolocationServiceClient* m_geolocationServiceClient;
-    OwnPtr<GeolocationService> m_geolocationServiceMock;
-};
-
-GeolocationService* GeolocationServiceChromiumMock::create(GeolocationServiceClient* geolocationServiceClient)
-{
-    return new GeolocationServiceChromiumMock(geolocationServiceClient);
-}
-
-GeolocationServiceChromiumMock::GeolocationServiceChromiumMock(GeolocationServiceClient* geolocationServiceClient)
-    : GeolocationServiceChromium(geolocationServiceClient),
-      m_geolocationServiceClient(geolocationServiceClient)
-{
-      m_geolocationServiceMock.set(GeolocationServiceMock::create(this));
-}
-
-bool GeolocationServiceChromiumMock::startUpdating(PositionOptions* positionOptions)
-{
-    GeolocationServiceChromium::startUpdating(positionOptions);
-    return m_geolocationServiceMock->startUpdating(positionOptions);
-}
-
-void GeolocationServiceChromiumMock::stopUpdating()
-{
-    GeolocationServiceChromium::stopUpdating();
-    m_geolocationServiceMock->stopUpdating();
-}
-
-Geoposition* GeolocationServiceChromiumMock::lastPosition() const
-{
-    return m_geolocationServiceMock->lastPosition();
-}
-
-PositionError* GeolocationServiceChromiumMock::lastError() const
-{
-    return m_geolocationServiceMock->lastError();
-}
-
-void GeolocationServiceChromiumMock::geolocationServicePositionChanged(GeolocationService* geolocationService)
-{
-    ASSERT_UNUSED(geolocationService, geolocationService == m_geolocationServiceMock);
-    m_geolocationServiceClient->geolocationServicePositionChanged(this);
-
-}
-
-void GeolocationServiceChromiumMock::geolocationServiceErrorOccurred(GeolocationService* geolocationService)
-{
-    ASSERT_UNUSED(geolocationService, geolocationService == m_geolocationServiceMock);
-    m_geolocationServiceClient->geolocationServiceErrorOccurred(this);
-}
-
-} // namespace WebCore
-
-namespace WebKit {
-
-class WebGeolocationServiceMockImpl : public WebGeolocationServiceMock {
-public:
-    WebGeolocationServiceMockImpl();
-    virtual ~WebGeolocationServiceMockImpl();
-    static void setMockGeolocationPermission(bool allowed);
-
-    // WebGeolocationService
-    virtual void requestPermissionForFrame(int bridgeId, const WebURL& url);
-    virtual int attachBridge(WebGeolocationServiceBridge*);
-    virtual void detachBridge(int bridgeId);
-
-private:
-    void notifyPendingPermissions();
-
-    typedef HashMap<int, WebGeolocationServiceBridge*> IdToBridgeMap;
-    IdToBridgeMap m_idToBridgeMap;
-    Vector<int> m_pendingPermissionRequests;
-
-    // In addition to the singleton instance pointer, we need to keep the setMockGeolocationPermission() state
-    // as a static (not object members) as this call may come in before the service has been created.
-    static enum PermissionState {
-        PermissionStateUnset,
-        PermissionStateAllowed,
-        PermissionStateDenied,
-    } s_permissionState;
-    static WebGeolocationServiceMockImpl* s_instance;
-};
-
-WebGeolocationServiceMockImpl::PermissionState WebGeolocationServiceMockImpl::s_permissionState = WebGeolocationServiceMockImpl::PermissionStateUnset;
-WebGeolocationServiceMockImpl* WebGeolocationServiceMockImpl::s_instance = 0;
-
-WebGeolocationServiceMock* WebGeolocationServiceMock::createWebGeolocationServiceMock()
-{
-    return new WebGeolocationServiceMockImpl;
-}
-
-void WebGeolocationServiceMock::setMockGeolocationPermission(bool allowed)
-{
-    WebGeolocationServiceMockImpl::setMockGeolocationPermission(allowed);
-}
-
-void WebGeolocationServiceMock::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
-{
-    WebCore::GeolocationService::setCustomMockFactory(&WebCore::GeolocationServiceChromiumMock::create);
-    RefPtr<Geoposition> geoposition = Geoposition::create(Coordinates::create(latitude, longitude, false, 0, accuracy, true, 0, false, 0, false, 0), currentTime() * 1000.0);
-    GeolocationServiceMock::setPosition(geoposition);
-}
-
-void WebGeolocationServiceMock::setMockGeolocationError(int errorCode, const WebString& message)
-{
-    WebCore::GeolocationService::setCustomMockFactory(&WebCore::GeolocationServiceChromiumMock::create);
-    RefPtr<PositionError> positionError = PositionError::create(static_cast<PositionError::ErrorCode>(errorCode), message);
-    GeolocationServiceMock::setError(positionError);
-}
-
-WebGeolocationServiceMockImpl::WebGeolocationServiceMockImpl()
-{
-    ASSERT(!s_instance);
-    s_instance = this;
-}
-
-WebGeolocationServiceMockImpl::~WebGeolocationServiceMockImpl()
-{
-    ASSERT(this == s_instance);
-    s_instance = 0;
-    // Reset the permission state, so any future service instance (e.g. running
-    // multiple tests in a single DRT run) will see a clean call sequence.
-    s_permissionState = PermissionStateUnset;
-    for (IdToBridgeMap::iterator it = m_idToBridgeMap.begin(); it != m_idToBridgeMap.end(); ++it)
-        it->second->didDestroyGeolocationService();
-}
-
-void WebGeolocationServiceMockImpl::setMockGeolocationPermission(bool allowed)
-{
-    s_permissionState = allowed ? PermissionStateAllowed : PermissionStateDenied;
-    if (s_instance)
-        s_instance->notifyPendingPermissions();
-}
-
-void WebGeolocationServiceMockImpl::requestPermissionForFrame(int bridgeId, const WebURL& url)
-{
-    m_pendingPermissionRequests.append(bridgeId);
-    if (s_permissionState != PermissionStateUnset)
-        notifyPendingPermissions();
-}
-
-int WebGeolocationServiceMockImpl::attachBridge(WebGeolocationServiceBridge* bridge)
-{
-    static int nextAvailableWatchId = 1;
-    // In case of overflow, make sure the ID remains positive, but reuse the ID values.
-    if (nextAvailableWatchId < 1)
-        nextAvailableWatchId = 1;
-    m_idToBridgeMap.set(nextAvailableWatchId, bridge);
-    return nextAvailableWatchId++;
-}
-
-void WebGeolocationServiceMockImpl::detachBridge(int bridgeId)
-{
-    m_idToBridgeMap.remove(bridgeId);
-}
-
-void WebGeolocationServiceMockImpl::notifyPendingPermissions()
-{
-    ASSERT(s_permissionState == PermissionStateAllowed || s_permissionState ==  PermissionStateDenied);
-    Vector<int> pendingPermissionRequests;
-    pendingPermissionRequests.swap(m_pendingPermissionRequests);
-    for (Vector<int>::const_iterator it = pendingPermissionRequests.begin(); it != pendingPermissionRequests.end(); ++it) {
-        ASSERT(*it > 0);
-        IdToBridgeMap::iterator iter = m_idToBridgeMap.find(*it);
-        if (iter != m_idToBridgeMap.end())
-            iter->second->setIsAllowed(s_permissionState == PermissionStateAllowed);
-    }
-}
-
-} // namespace WebKit
-#endif // ENABLE(GEOLOCATION)
index e47c89e..7056a0a 100644 (file)
@@ -311,9 +311,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
     , m_speechInputClient(SpeechInputClientImpl::create(client))
 #endif
     , m_deviceOrientationClientProxy(new DeviceOrientationClientProxy(client ? client->deviceOrientationClient() : 0))
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     , m_geolocationClientProxy(new GeolocationClientProxy(client ? client->geolocationClient() : 0))
-#endif
 {
     // WebKit/win/WebView.cpp does the same thing, except they call the
     // KJS specific wrapper around this method. We need to have threading
@@ -337,15 +335,11 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
     pageClients.speechInputClient = m_speechInputClient.get();
 #endif
     pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get();
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     pageClients.geolocationClient = m_geolocationClientProxy.get();
-#endif
 
     m_page.set(new Page(pageClients));
 
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     m_geolocationClientProxy->setController(m_page->geolocationController());
-#endif
 
     static_cast<BackForwardListImpl*>(m_page->backForwardList())->setClient(&m_backForwardListClientImpl);
     m_page->setGroupName(pageGroupName);
index cc25c84..0857d11 100644 (file)
@@ -543,10 +543,7 @@ private:
     // early. This member holds on to the GC3D in this case.
     RefPtr<WebCore::GraphicsContext3D> m_temporaryOnscreenGraphicsContext3D;
     OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy;
-
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
     OwnPtr<GeolocationClientProxy> m_geolocationClientProxy;
-#endif
 };
 
 } // namespace WebKit