WebCore/ChangeLog

 12010-10-13 John Knottenbelt <jknotten@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 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
1122010-10-13 Steve Block <steveblock@google.com>
213
314 Reviewed by Alexey Proskuryakov.

WebCore/WebCore.gyp/WebCore.gyp

12021202 ['exclude', 'Posix\\.cpp$'],
12031203 ],
12041204 }],
 1205 ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
 1206 'sources/': [
 1207 ['exclude', '/GeolocationService.*$'],
 1208 ],
 1209 }],
12051210 ],
12061211 },
12071212 {

WebCore/platform/chromium/ChromiumBridge.h

@@namespace WebCore {
154154 // Forms --------------------------------------------------------------
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
162163 static PlatformFileHandle databaseOpenFile(const String& vfsFleName, int desiredFlags);

WebKit/chromium/ChangeLog

 12010-10-13 John Knottenbelt <jknotten@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 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-12 Kenneth Russell <kbr@google.com>
221
322 Unreviewed. Fixes for all WebGL content causing assertion failures

WebKit/chromium/WebKit.gyp

646646 }],
647647 ],
648648 }],
 649 ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
 650 'sources/': [
 651 ['exclude', 'WebGeolocationService.*$'],
 652 ['include', 'WebGeolocationServiceMock.*'],
 653 ],
 654 }]
649655 ],
650656 },
651657

WebKit/chromium/src/ChromeClientImpl.cpp

@@NotificationPresenter* ChromeClientImpl::notificationPresenter() const
771771
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
785793#if USE(ACCELERATED_COMPOSITING)

WebKit/chromium/src/ChromiumBridge.cpp

8686#include "PlatformContextSkia.h"
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"
9296#include <wtf/Assertions.h>

@@bool ChromiumBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* out)
465469}
466470#endif
467471
 472#if !ENABLE(CLIENT_BASED_GEOLOCATION)
468473// Geolocation ----------------------------------------------------------------
469474
470475GeolocationServiceBridge* ChromiumBridge::createGeolocationServiceBridge(GeolocationServiceChromium* geolocationServiceChromium)
471476{
472477 return createGeolocationServiceBridgeImpl(geolocationServiceChromium);
473478}
 479#endif
474480
475481// Databases ------------------------------------------------------------------
476482

WebKit/chromium/src/WebGeolocationServiceMock.cpp

4242
4343#if ENABLE(GEOLOCATION)
4444
 45#if ENABLE(CLIENT_BASED_GEOLOCATION)
 46// FIXME: Implement mock bindings for client-based geolocation
 47
 48namespace WebKit {
 49
 50class WebGeolocationServiceMockClientBasedImpl : public WebGeolocationServiceMock {
 51};
 52
 53WebGeolocationServiceMock* WebGeolocationServiceMock::createWebGeolocationServiceMock()
 54{
 55 return new WebGeolocationServiceMockClientBasedImpl;
 56}
 57
 58void WebGeolocationServiceMock::setMockGeolocationPermission(bool allowed)
 59{
 60 // FIXME: Implement mock binding
 61}
 62
 63void WebGeolocationServiceMock::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
 64{
 65 // FIXME: Implement mock binding
 66}
 67
 68void WebGeolocationServiceMock::setMockGeolocationError(int errorCode, const WebString& message)
 69{
 70 // FIXME: Implement mock binding
 71}
 72
 73} // namespace WebKit
 74
 75#else
4576using WebCore::Coordinates;
4677using WebCore::Frame;
4778using WebCore::Geolocation;

@@void WebGeolocationServiceMockImpl::notifyPendingPermissions()
241272
242273} // namespace WebKit
243274
 275#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
244276#endif // ENABLE(GEOLOCATION)

WebKitTools/ChangeLog

 12010-10-13 John Knottenbelt <jknotten@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 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/LayoutTestController.cpp:
 10 (LayoutTestController::setGeolocationPermission):
 11 (LayoutTestController::setMockGeolocationPosition):
 12 (LayoutTestController::setMockGeolocationError):
 13 * DumpRenderTree/chromium/WebViewHost.cpp:
 14 * DumpRenderTree/chromium/WebViewHost.h:
 15
1162010-10-12 Dirk Pranke <dpranke@chromium.org>
217
318 Reviewed by Eric Seidel.

WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp

@@void LayoutTestController::setGeolocationPermission(const CppArgumentList& argum
14981498 result->setNull();
14991499 if (arguments.size() < 1 || !arguments[0].isBool())
15001500 return;
 1501#if !ENABLE(CLIENT_BASED_GEOLOCATION)
 1502 // FIXME: Implement setMockGeolocationPosition client-based
15011503 WebGeolocationServiceMock::setMockGeolocationPermission(arguments[0].toBoolean());
 1504#endif
15021505}
15031506
15041507void LayoutTestController::setMockGeolocationPosition(const CppArgumentList& arguments, CppVariant* result)

@@void LayoutTestController::setMockGeolocationPosition(const CppArgumentList& arg
15061509 result->setNull();
15071510 if (arguments.size() < 3 || !arguments[0].isNumber() || !arguments[1].isNumber() || !arguments[2].isNumber())
15081511 return;
 1512#if !ENABLE(CLIENT_BASED_GEOLOCATION)
 1513 // FIXME: Implement setMockGeolocationPosition client-based
15091514 WebGeolocationServiceMock::setMockGeolocationPosition(arguments[0].toDouble(), arguments[1].toDouble(), arguments[2].toDouble());
 1515#endif
15101516}
15111517
15121518void LayoutTestController::setMockGeolocationError(const CppArgumentList& arguments, CppVariant* result)

@@void LayoutTestController::setMockGeolocationError(const CppArgumentList& argume
15141520 result->setNull();
15151521 if (arguments.size() < 2 || !arguments[0].isInt32() || !arguments[1].isString())
15161522 return;
 1523#if !ENABLE(CLIENT_BASED_GEOLOCATION)
 1524 // FIXME: Implement setMockGeolocationError client-based
15171525 WebGeolocationServiceMock::setMockGeolocationError(arguments[0].toInt32(), cppVariantToWebString(arguments[1]));
 1526#endif
15181527}
15191528
15201529void LayoutTestController::abortModal(const CppArgumentList& arguments, CppVariant* result)

WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp

@@WebNotificationPresenter* WebViewHost::notificationPresenter()
559559 return m_shell->notificationPresenter();
560560}
561561
 562#if !ENABLE(CLIENT_BASED_GEOLOCATION)
562563WebKit::WebGeolocationService* WebViewHost::geolocationService()
563564{
564565 if (!m_geolocationServiceMock.get())
565566 m_geolocationServiceMock.set(WebGeolocationServiceMock::createWebGeolocationServiceMock());
566567 return m_geolocationServiceMock.get();
567568}
 569#endif
568570
569571WebSpeechInputController* WebViewHost::speechInputController(WebKit::WebSpeechInputListener* listener)
570572{

WebKitTools/DumpRenderTree/chromium/WebViewHost.h

@@class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
129129 virtual int historyForwardListCount();
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();
135137

@@private:
287289 WebKit::WebRect m_paintRect;
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;
294298};