Changeset 69673 in webkit


Ignore:
Timestamp:
Oct 13, 2010 11:01:39 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-13 John Knottenbelt <jknotten@chromium.org>

Reviewed by Steve Block.

First step towards client-based Geolocation in Chromium. Build
fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
https://bugs.webkit.org/show_bug.cgi?id=47586

  • WebCore.gyp/WebCore.gyp:
  • platform/chromium/ChromiumBridge.h:
  • platform/chromium/GeolocationServiceChromium.cpp:

2010-10-13 John Knottenbelt <jknotten@chromium.org>

Reviewed by Steve Block.

First step towards client-based Geolocation in Chromium. Build
fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
https://bugs.webkit.org/show_bug.cgi?id=47586

  • WebKit.gyp:
  • src/ChromeClientImpl.cpp: (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame): (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame):
  • src/ChromiumBridge.cpp:
  • src/WebGeolocationServiceMock.cpp: (WebKit::WebGeolocationServiceMock::createWebGeolocationServiceMock): (WebKit::WebGeolocationServiceMock::setMockGeolocationPermission): (WebKit::WebGeolocationServiceMock::setMockGeolocationPosition): (WebKit::WebGeolocationServiceMock::setMockGeolocationError):

2010-10-13 John Knottenbelt <jknotten@chromium.org>

Reviewed by Steve Block.

First step towards client-based Geolocation in Chromium. Build
fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
https://bugs.webkit.org/show_bug.cgi?id=47586

  • DumpRenderTree/chromium/WebViewHost.cpp:
  • DumpRenderTree/chromium/WebViewHost.h:
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r69666 r69673  
     12010-10-13  John Knottenbelt  <jknotten@chromium.org>
     2
     3        Reviewed by Steve Block.
     4
     5        First step towards client-based Geolocation in Chromium. Build
     6        fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
     7        https://bugs.webkit.org/show_bug.cgi?id=47586
     8
     9        * WebCore.gyp/WebCore.gyp:
     10        * platform/chromium/ChromiumBridge.h:
     11        * platform/chromium/GeolocationServiceChromium.cpp:
     12
    1132010-10-13  Steve Block  <steveblock@google.com>
    214
  • trunk/WebCore/WebCore.gyp/WebCore.gyp

    r69549 r69673  
    12031203          ],
    12041204        }],
     1205        ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
     1206          'sources/': [
     1207            ['exclude', '/GeolocationService.*$'],
     1208          ],
     1209        }],
    12051210      ],
    12061211    },
  • trunk/WebCore/platform/chromium/ChromiumBridge.h

    r69586 r69673  
    155155        static void notifyFormStateChanged(const Document*);
    156156
     157#if !ENABLE(CLIENT_BASED_GEOLOCATION)
    157158        // Geolocation --------------------------------------------------------
    158159        static GeolocationServiceBridge* createGeolocationServiceBridge(GeolocationServiceChromium*);
    159 
     160#endif
    160161        // Databases ----------------------------------------------------------
    161162        // Returns a handle to the DB file and ooptionally a handle to its containing directory
  • trunk/WebCore/platform/chromium/GeolocationServiceChromium.cpp

    r67387 r69673  
    3333
    3434#include "ChromiumBridge.h"
     35
     36#if ENABLE(CLIENT_BASED_GEOLOCATION)
     37#error "This file should not be compiled when ENABLE(CLIENT_BASED_GEOLOCATION)"
     38#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
    3539
    3640namespace WebCore {
  • trunk/WebKit/chromium/ChangeLog

    r69670 r69673  
     12010-10-13  John Knottenbelt  <jknotten@chromium.org>
     2
     3        Reviewed by Steve Block.
     4
     5        First step towards client-based Geolocation in Chromium. Build
     6        fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
     7        https://bugs.webkit.org/show_bug.cgi?id=47586
     8
     9        * WebKit.gyp:
     10        * src/ChromeClientImpl.cpp:
     11        (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame):
     12        (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame):
     13        * src/ChromiumBridge.cpp:
     14        * src/WebGeolocationServiceMock.cpp:
     15        (WebKit::WebGeolocationServiceMock::createWebGeolocationServiceMock):
     16        (WebKit::WebGeolocationServiceMock::setMockGeolocationPermission):
     17        (WebKit::WebGeolocationServiceMock::setMockGeolocationPosition):
     18        (WebKit::WebGeolocationServiceMock::setMockGeolocationError):
     19
    1202010-10-11  Andrei Popescu  <andreip@google.com>
    221
  • trunk/WebKit/chromium/WebKit.gyp

    r69611 r69673  
    647647                    ],
    648648                }],
     649                ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
     650                    'sources/': [
     651                        ['exclude', 'WebGeolocationService.*$'],
     652                        ['include', 'WebGeolocationServiceMock.*'],
     653                    ],
     654                }]
    649655            ],
    650656        },
  • trunk/WebKit/chromium/src/ChromeClientImpl.cpp

    r69274 r69673  
    772772void ChromeClientImpl::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
    773773{
     774#if ENABLE(CLIENT_BASED_GEOLOCATION)
     775    // FIXME: Implement Client-based Geolocation Permissions
     776#else
    774777    GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService());
    775778    geolocationService->geolocationServiceBridge()->attachBridgeIfNeeded();
    776779    m_webView->client()->geolocationService()->requestPermissionForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url());
     780#endif
    777781}
    778782
    779783void ChromeClientImpl::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation)
    780784{
     785#if ENABLE(CLIENT_BASED_GEOLOCATION)
     786    // FIXME: Implement Client-based Geolocation Permissions
     787#else
    781788    GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService());
    782789    m_webView->client()->geolocationService()->cancelPermissionRequestForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url());
     790#endif
    783791}
    784792
  • trunk/WebKit/chromium/src/ChromiumBridge.cpp

    r69586 r69673  
    8787#include "PluginData.h"
    8888#include "SharedBuffer.h"
     89
     90#if !ENABLE(CLIENT_BASED_GEOLOCATION)
    8991#include "WebGeolocationServiceBridgeImpl.h"
     92#endif
     93
    9094#include "Worker.h"
    9195#include "WorkerContextProxy.h"
     
    466470#endif
    467471
     472#if !ENABLE(CLIENT_BASED_GEOLOCATION)
    468473// Geolocation ----------------------------------------------------------------
    469474
     
    472477    return createGeolocationServiceBridgeImpl(geolocationServiceChromium);
    473478}
     479#endif
    474480
    475481// Databases ------------------------------------------------------------------
  • trunk/WebKit/chromium/src/WebGeolocationServiceMock.cpp

    r67387 r69673  
    4343#if ENABLE(GEOLOCATION)
    4444
     45#if ENABLE(CLIENT_BASED_GEOLOCATION)
     46// FIXME: Implement mock bindings for client-based geolocation. Ultimately
     47// move to another class and remove WebGeolocationService*.
     48
     49namespace WebKit {
     50
     51class WebGeolocationServiceMockClientBasedImpl : public WebGeolocationServiceMock {
     52};
     53
     54WebGeolocationServiceMock* WebGeolocationServiceMock::createWebGeolocationServiceMock()
     55{
     56    return new WebGeolocationServiceMockClientBasedImpl;
     57}
     58
     59void WebGeolocationServiceMock::setMockGeolocationPermission(bool allowed)
     60{
     61    // FIXME: Implement mock binding
     62}
     63
     64void WebGeolocationServiceMock::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
     65{
     66    // FIXME: Implement mock binding
     67}
     68
     69void WebGeolocationServiceMock::setMockGeolocationError(int errorCode, const WebString& message)
     70{
     71    // FIXME: Implement mock binding
     72}
     73
     74} // namespace WebKit
     75
     76#else
    4577using WebCore::Coordinates;
    4678using WebCore::Frame;
     
    242274} // namespace WebKit
    243275
     276#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
    244277#endif // ENABLE(GEOLOCATION)
  • trunk/WebKitTools/ChangeLog

    r69671 r69673  
     12010-10-13  John Knottenbelt  <jknotten@chromium.org>
     2
     3        Reviewed by Steve Block.
     4
     5        First step towards client-based Geolocation in Chromium. Build
     6        fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
     7        https://bugs.webkit.org/show_bug.cgi?id=47586
     8
     9        * DumpRenderTree/chromium/WebViewHost.cpp:
     10        * DumpRenderTree/chromium/WebViewHost.h:
     11
    1122010-10-13  Adam Roben  <aroben@apple.com>
    213
  • trunk/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp

    r69550 r69673  
    560560}
    561561
     562#if !ENABLE(CLIENT_BASED_GEOLOCATION)
    562563WebKit::WebGeolocationService* WebViewHost::geolocationService()
    563564{
     
    566567    return m_geolocationServiceMock.get();
    567568}
     569#endif
    568570
    569571WebSpeechInputController* WebViewHost::speechInputController(WebKit::WebSpeechInputListener* listener)
  • trunk/WebKitTools/DumpRenderTree/chromium/WebViewHost.h

    r69550 r69673  
    130130    virtual void postAccessibilityNotification(const WebKit::WebAccessibilityObject&, WebKit::WebAccessibilityNotification);
    131131    virtual WebKit::WebNotificationPresenter* notificationPresenter();
     132#if !ENABLE(CLIENT_BASED_GEOLOCATION)
    132133    virtual WebKit::WebGeolocationService* geolocationService();
     134#endif
    133135    virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*);
    134136    virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient();
     
    288290    bool m_isPainting;
    289291
     292#if !ENABLE(CLIENT_BASED_GEOLOCATION)
    290293    // Geolocation
    291294    OwnPtr<WebKit::WebGeolocationServiceMock> m_geolocationServiceMock;
     295#endif
    292296
    293297    OwnPtr<TestNavigationController*> m_navigationController;
Note: See TracChangeset for help on using the changeset viewer.