Changeset 75367 in webkit


Ignore:
Timestamp:
Jan 10, 2011 3:41:44 AM (13 years ago)
Author:
jorlow@chromium.org
Message:

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 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:
Location:
trunk
Files:
8 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r75365 r75367  
     12011-01-10  John Knottenbelt  <jknotten@chromium.org>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        [Chromium] Remove non-client-based Geolocation code
     6        https://bugs.webkit.org/show_bug.cgi?id=50921
     7
     8        Code clean up, covered by existing tests.
     9
     10        * WebCore.gyp/WebCore.gyp:
     11        * WebCore.gypi:
     12        * platform/chromium/ChromiumBridge.h:
     13        * platform/chromium/GeolocationServiceChromium.cpp: Removed.
     14        * platform/chromium/GeolocationServiceChromium.h: Removed.
     15
    1162011-01-10  Ilya Tikhonovsky  <loislo@chromium.org>
    217
  • trunk/Source/WebCore/WebCore.gyp/WebCore.gyp

    r75313 r75367  
    12371237          ],
    12381238        }],
    1239         ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
    1240           'sources/': [
    1241             ['exclude', '/GeolocationService.*$'],
    1242           ],
    1243         }],
    12441239        ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
    12451240          'sources/': [
  • trunk/Source/WebCore/WebCore.gypi

    r75363 r75367  
    24602460            'platform/chromium/FramelessScrollView.h',
    24612461            'platform/chromium/FramelessScrollViewClient.h',
    2462             'platform/chromium/GeolocationServiceChromium.cpp',
    2463             'platform/chromium/GeolocationServiceChromium.h',
    24642462            'platform/chromium/KeyCodeConversion.h',
    24652463            'platform/chromium/KeyCodeConversionGtk.cpp',
  • trunk/Source/WebCore/platform/chromium/ChromiumBridge.h

    r75292 r75367  
    160160        static void notifyFormStateChanged(const Document*);
    161161
    162 #if !ENABLE(CLIENT_BASED_GEOLOCATION)
    163         // Geolocation --------------------------------------------------------
    164         static GeolocationServiceBridge* createGeolocationServiceBridge(GeolocationServiceChromium*);
    165 #endif
    166162        // Databases ----------------------------------------------------------
    167163        // Returns a handle to the DB file and ooptionally a handle to its containing directory
  • trunk/Tools/ChangeLog

    r75366 r75367  
     12011-01-10  John Knottenbelt  <jknotten@chromium.org>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        [Chromium] Remove non-client-based Geolocation code
     6        https://bugs.webkit.org/show_bug.cgi?id=50921
     7
     8        * DumpRenderTree/chromium/LayoutTestController.cpp:
     9        (LayoutTestController::setGeolocationPermission):
     10        (LayoutTestController::setMockGeolocationPosition):
     11        (LayoutTestController::setMockGeolocationError):
     12        * DumpRenderTree/chromium/WebViewHost.cpp:
     13        (WebViewHost::geolocationClientMock):
     14        (WebViewHost::reset):
     15        * DumpRenderTree/chromium/WebViewHost.h:
     16
    1172011-01-10  Eric Seidel  <eric@webkit.org>
    218
  • trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp

    r74598 r75367  
    4444#include "WebElement.h"
    4545#include "WebFrame.h"
    46 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    4746#include "WebGeolocationClientMock.h"
    48 #else
    49 #include "WebGeolocationServiceMock.h"
    50 #endif
    5147#include "WebInputElement.h"
    5248#include "WebKit.h"
     
    15251521    if (arguments.size() < 1 || !arguments[0].isBool())
    15261522        return;
    1527 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    15281523    m_shell->webViewHost()->geolocationClientMock()->setPermission(arguments[0].toBoolean());
    1529 #else
    1530     WebGeolocationServiceMock::setMockGeolocationPermission(arguments[0].toBoolean());
    1531 #endif
    15321524}
    15331525
     
    15371529    if (arguments.size() < 3 || !arguments[0].isNumber() || !arguments[1].isNumber() || !arguments[2].isNumber())
    15381530        return;
    1539 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    15401531    m_shell->webViewHost()->geolocationClientMock()->setPosition(arguments[0].toDouble(), arguments[1].toDouble(), arguments[2].toDouble());
    1541 #else
    1542     WebGeolocationServiceMock::setMockGeolocationPosition(arguments[0].toDouble(), arguments[1].toDouble(), arguments[2].toDouble());
    1543 #endif
    15441532}
    15451533
     
    15491537    if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isString())
    15501538        return;
    1551 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    15521539    m_shell->webViewHost()->geolocationClientMock()->setError(arguments[0].toInt32(), cppVariantToWebString(arguments[1]));
    1553 #else
    1554     WebGeolocationServiceMock::setMockGeolocationError(arguments[0].toInt32(), cppVariantToWebString(arguments[1]));
    1555 #endif
    15561540}
    15571541
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r75276 r75367  
    4444#include "WebElement.h"
    4545#include "WebFrame.h"
    46 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    4746#include "WebGeolocationClientMock.h"
    48 #else
    49 #include "WebGeolocationServiceMock.h"
    50 #endif
    5147#include "WebHistoryItem.h"
    5248#include "WebNode.h"
     
    572568}
    573569
    574 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    575570WebKit::WebGeolocationClient* WebViewHost::geolocationClient()
    576571{
     
    584579    return m_geolocationClientMock.get();
    585580}
    586 #else
    587 WebKit::WebGeolocationService* WebViewHost::geolocationService()
    588 {
    589     if (!m_geolocationServiceMock)
    590         m_geolocationServiceMock.set(WebGeolocationServiceMock::createWebGeolocationServiceMock());
    591     return m_geolocationServiceMock.get();
    592 }
    593 #endif
    594581
    595582WebSpeechInputController* WebViewHost::speechInputController(WebKit::WebSpeechInputListener* listener)
     
    11781165    m_editCommandValue.clear();
    11791166
    1180 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    11811167    if (m_geolocationClientMock.get())
    11821168        m_geolocationClientMock->resetMock();
    1183 #else
    1184     m_geolocationServiceMock.clear();
    1185 #endif
    11861169
    11871170    if (m_speechInputControllerMock.get())
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.h

    r73745 r75367  
    140140    virtual void postAccessibilityNotification(const WebKit::WebAccessibilityObject&, WebKit::WebAccessibilityNotification);
    141141    virtual WebKit::WebNotificationPresenter* notificationPresenter();
    142 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    143142    virtual WebKit::WebGeolocationClient* geolocationClient();
    144 #else
    145     virtual WebKit::WebGeolocationService* geolocationService();
    146 #endif
    147143    virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*);
    148144    virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient();
     
    211207    MockSpellCheck* mockSpellCheck();
    212208
    213 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    214209    // Geolocation client mocks for LayoutTestController
    215210    WebKit::WebGeolocationClientMock* geolocationClientMock();
    216 #endif
    217211
    218212private:
     
    318312
    319313    // Geolocation
    320 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    321314    OwnPtr<WebKit::WebGeolocationClientMock> m_geolocationClientMock;
    322 #else
    323     OwnPtr<WebKit::WebGeolocationServiceMock> m_geolocationServiceMock;
    324 #endif
    325315
    326316    OwnPtr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationClientMock;
  • trunk/WebKit/chromium/ChangeLog

    r75361 r75367  
     12011-01-10  John Knottenbelt  <jknotten@chromium.org>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        [Chromium] Remove non-client-based Geolocation code
     6        https://bugs.webkit.org/show_bug.cgi?id=50921
     7
     8        * WebKit.gyp:
     9        * public/WebGeolocationService.h: Removed.
     10        * public/WebGeolocationServiceBridge.h: Removed.
     11        * public/WebGeolocationServiceMock.h: Removed.
     12        * src/AssertMatchingEnums.cpp:
     13        * src/ChromeClientImpl.cpp:
     14        (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame):
     15        (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame):
     16        * src/ChromiumBridge.cpp:
     17        * src/WebGeolocationServiceBridgeImpl.cpp: Removed.
     18        * src/WebGeolocationServiceBridgeImpl.h: Removed.
     19        * src/WebGeolocationServiceMock.cpp: Removed.
     20        * src/WebViewImpl.cpp:
     21        (WebKit::WebViewImpl::WebViewImpl):
     22        * src/WebViewImpl.h:
     23
    1242011-01-09  Johnny Ding  <jnd@chromium.org>
    225
  • trunk/WebKit/chromium/WebKit.gyp

    r75313 r75367  
    184184                'public/WebGeolocationPermissionRequestManager.h',
    185185                'public/WebGeolocationPosition.h',
    186                 'public/WebGeolocationService.h',
    187                 'public/WebGeolocationServiceBridge.h',
    188                 'public/WebGeolocationServiceMock.h',
    189186                'public/WebGlyphCache.h',
    190187                'public/WebGraphicsContext3D.h',
     
    463460                'src/WebGeolocationPermissionRequestManager.cpp',
    464461                'src/WebGeolocationPosition.cpp',
    465                 'src/WebGeolocationServiceBridgeImpl.cpp',
    466                 'src/WebGeolocationServiceBridgeImpl.h',
    467                 'src/WebGeolocationServiceMock.cpp',
    468462                'src/WebGlyphCache.cpp',
    469463                'src/WebGraphicsContext3D.cpp',
     
    681675                    ],
    682676                }],
    683                 ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
    684                     'sources/': [
    685                         ['exclude', 'WebGeolocationService.*$'],
    686                     ],
    687                 }, {
    688                    'sources/': [
    689                         ['exclude', 'GeolocationClientProxy.*'],
    690                         ['exclude', 'WebGeolocationClient.*'],
    691                         ['exclude', 'WebGeolocationController.*'],
    692                         ['exclude', 'WebGeolocationError.*'],
    693                         ['exclude', 'WebGeolocationPermissionRequest.*'],
    694                         ['exclude', 'WebGeolocationPosition.*'],
    695                    ],
    696                 }]
    697677            ],
    698678        },
     
    873853                    },
    874854                }],
    875                 ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
    876                     'sources/': [
    877                         ['exclude', 'WebGeolocationService.*$'],
    878                     ],
    879                 }]
    880855            ],
    881856        },
  • trunk/WebKit/chromium/src/AssertMatchingEnums.cpp

    r74581 r75367  
    395395COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorPathExists, FileError::PATH_EXISTS_ERR);
    396396
    397 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    398397COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPermissionDenied, GeolocationError::PermissionDenied);
    399398COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPositionUnavailable, GeolocationError::PositionUnavailable);
    400 #endif
    401399
    402400#if OS(DARWIN)
  • trunk/WebKit/chromium/src/ChromeClientImpl.cpp

    r75349 r75367  
    4848#include "Geolocation.h"
    4949#include "GeolocationService.h"
    50 #include "GeolocationServiceChromium.h"
    5150#include "GraphicsLayer.h"
    5251#include "HTMLNames.h"
     
    7271#include "WebFrameClient.h"
    7372#include "WebFrameImpl.h"
    74 #include "WebGeolocationService.h"
    7573#include "WebInputEvent.h"
    7674#include "WebKit.h"
     
    779777void ChromeClientImpl::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
    780778{
    781 #if !ENABLE(CLIENT_BASED_GEOLOCATION)
    782     GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService());
    783     geolocationService->geolocationServiceBridge()->attachBridgeIfNeeded();
    784     m_webView->client()->geolocationService()->requestPermissionForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url());
    785 #endif
     779    ASSERT_NOT_REACHED();
    786780}
    787781
    788782void ChromeClientImpl::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation)
    789783{
    790 #if !ENABLE(CLIENT_BASED_GEOLOCATION)
    791     GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService());
    792     m_webView->client()->geolocationService()->cancelPermissionRequestForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url());
    793 #endif
     784    ASSERT_NOT_REACHED();
    794785}
    795786
  • trunk/WebKit/chromium/src/ChromiumBridge.cpp

    r75292 r75367  
    9797#include "SharedBuffer.h"
    9898
    99 #if !ENABLE(CLIENT_BASED_GEOLOCATION)
    100 #include "WebGeolocationServiceBridgeImpl.h"
    101 #endif
    102 
    10399#include "Worker.h"
    104100#include "WorkerContextProxy.h"
     
    481477    *out = 0;
    482478    return false;
    483 }
    484 #endif
    485 
    486 #if !ENABLE(CLIENT_BASED_GEOLOCATION)
    487 // Geolocation ----------------------------------------------------------------
    488 
    489 GeolocationServiceBridge* ChromiumBridge::createGeolocationServiceBridge(GeolocationServiceChromium* geolocationServiceChromium)
    490 {
    491     return createGeolocationServiceBridgeImpl(geolocationServiceChromium);
    492479}
    493480#endif
  • trunk/WebKit/chromium/src/WebViewImpl.cpp

    r75276 r75367  
    312312#endif
    313313    , m_deviceOrientationClientProxy(new DeviceOrientationClientProxy(client ? client->deviceOrientationClient() : 0))
    314 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    315314    , m_geolocationClientProxy(new GeolocationClientProxy(client ? client->geolocationClient() : 0))
    316 #endif
    317315{
    318316    // WebKit/win/WebView.cpp does the same thing, except they call the
     
    338336#endif
    339337    pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get();
    340 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    341338    pageClients.geolocationClient = m_geolocationClientProxy.get();
    342 #endif
    343339
    344340    m_page.set(new Page(pageClients));
    345341
    346 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    347342    m_geolocationClientProxy->setController(m_page->geolocationController());
    348 #endif
    349343
    350344    static_cast<BackForwardListImpl*>(m_page->backForwardList())->setClient(&m_backForwardListClientImpl);
  • trunk/WebKit/chromium/src/WebViewImpl.h

    r75276 r75367  
    544544    RefPtr<WebCore::GraphicsContext3D> m_temporaryOnscreenGraphicsContext3D;
    545545    OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy;
    546 
    547 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    548546    OwnPtr<GeolocationClientProxy> m_geolocationClientProxy;
    549 #endif
    550547};
    551548
Note: See TracChangeset for help on using the changeset viewer.