Changeset 44093 in webkit


Ignore:
Timestamp:
May 23, 2009 8:28:14 AM (15 years ago)
Author:
zecke@webkit.org
Message:

2009-05-23 Laszlo Gombos <Laszlo Gombos>

Reviewed by Eric Seidel.

Add GEOLOCATION guards around Geolocation API code
https://bugs.webkit.org/show_bug.cgi?id=25756

  • bindings/js/JSCustomPositionCallback.cpp:
  • bindings/js/JSCustomPositionCallback.h:
  • bindings/js/JSCustomPositionErrorCallback.cpp:
  • bindings/js/JSCustomPositionErrorCallback.h:
  • bindings/js/JSGeolocationCustom.cpp:
  • page/Geolocation.cpp:
  • page/Geolocation.idl:
  • page/Geoposition.cpp:
  • page/Geoposition.h:
  • page/Geoposition.idl:
  • page/Navigator.cpp: (WebCore::Navigator::disconnectFrame): (WebCore::Navigator::geolocation):
  • page/PositionError.idl:
  • platform/GeolocationService.cpp:
Location:
trunk/WebCore
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r44091 r44093  
     12009-05-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Add GEOLOCATION guards around Geolocation API code
     6        https://bugs.webkit.org/show_bug.cgi?id=25756
     7
     8        * bindings/js/JSCustomPositionCallback.cpp:
     9        * bindings/js/JSCustomPositionCallback.h:
     10        * bindings/js/JSCustomPositionErrorCallback.cpp:
     11        * bindings/js/JSCustomPositionErrorCallback.h:
     12        * bindings/js/JSGeolocationCustom.cpp:
     13        * page/Geolocation.cpp:
     14        * page/Geolocation.idl:
     15        * page/Geoposition.cpp:
     16        * page/Geoposition.h:
     17        * page/Geoposition.idl:
     18        * page/Navigator.cpp:
     19        (WebCore::Navigator::disconnectFrame):
     20        (WebCore::Navigator::geolocation):
     21        * page/PositionError.idl:
     22        * platform/GeolocationService.cpp:
     23
    1242009-05-23  David Kilzer  <ddkilzer@apple.com>
    225
  • trunk/WebCore/bindings/js/JSCustomPositionCallback.cpp

    r43122 r44093  
    2626#include "config.h"
    2727#include "JSCustomPositionCallback.h"
     28
     29#if ENABLE(GEOLOCATION)
    2830
    2931#include "Frame.h"
     
    8587
    8688} // namespace WebCore
     89
     90#endif // ENABLE(GEOLOCATION)
  • trunk/WebCore/bindings/js/JSCustomPositionCallback.h

    r38137 r44093  
    2626#ifndef JSCustomPositionCallback_h
    2727#define JSCustomPositionCallback_h
     28
     29#if ENABLE(GEOLOCATION)
    2830
    2931#include "PositionCallback.h"
     
    5658} // namespace WebCore
    5759
     60#endif // ENABLE(GEOLOCATION)
     61
    5862#endif // JSCustomPositionCallback_h
  • trunk/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp

    r43122 r44093  
    2626#include "config.h"
    2727#include "JSCustomPositionErrorCallback.h"
     28
     29#if ENABLE(GEOLOCATION)
    2830
    2931#include "Frame.h"
     
    8385   
    8486} // namespace WebCore
     87
     88#endif // ENABLE(GEOLOCATION)
  • trunk/WebCore/bindings/js/JSCustomPositionErrorCallback.h

    r38137 r44093  
    2626#ifndef JSCustomPositionErrorCallback_h
    2727#define JSCustomPositionErrorCallback_h
     28
     29#if ENABLE(GEOLOCATION)
    2830
    2931#include "PositionErrorCallback.h"
     
    5658} // namespace WebCore
    5759
     60#endif // ENABLE(GEOLOCATION)
     61
    5862#endif // JSCustomPositionErrorCallback_h
  • trunk/WebCore/bindings/js/JSGeolocationCustom.cpp

    r43122 r44093  
    2626#include "config.h"
    2727#include "JSGeolocation.h"
     28
     29#if ENABLE(GEOLOCATION)
    2830
    2931#include "DOMWindow.h"
     
    149151
    150152} // namespace WebCore
     153
     154#endif // ENABLE(GEOLOCATION)
  • trunk/WebCore/page/Geolocation.cpp

    r42445 r44093  
    2727#include "Geolocation.h"
    2828
     29#if ENABLE(GEOLOCATION)
     30
    2931#include "Chrome.h"
    3032#include "Document.h"
     
    296298
    297299} // namespace WebCore
     300
     301#endif // ENABLE(GEOLOCATION)
  • trunk/WebCore/page/Geolocation.idl

    r37854 r44093  
    2626module core {
    2727
    28     interface Geolocation {
     28    interface [Conditional=GEOLOCATION] Geolocation {
    2929        readonly attribute Geoposition lastPosition;
    3030
  • trunk/WebCore/page/Geoposition.cpp

    r41729 r44093  
    2727#include "Geoposition.h"
    2828
     29#if ENABLE(GEOLOCATION)
     30
    2931namespace WebCore {
    3032
     
    3537
    3638} // namespace WebCore
     39
     40#endif // ENABLE(GEOLOCATION)
  • trunk/WebCore/page/Geoposition.h

    r41650 r44093  
    2626#ifndef Geoposition_h
    2727#define Geoposition_h
     28
     29#if ENABLE(GEOLOCATION)
    2830
    2931#include "Coordinates.h"
     
    5860} // namespace WebCore
    5961
     62#endif // ENABLE(GEOLOCATION)
     63
    6064#endif // Geoposition_h
  • trunk/WebCore/page/Geoposition.idl

    r43528 r44093  
    2626module core {
    2727
    28     interface Geoposition {
     28    interface [Conditional=GEOLOCATION] Geoposition {
    2929        readonly attribute Coordinates coords;
    3030        readonly attribute DOMTimeStamp timestamp;
  • trunk/WebCore/page/Navigator.cpp

    r42449 r44093  
    6060        m_mimeTypes = 0;
    6161    }
     62#if ENABLE(GEOLOCATION)
    6263    if (m_geolocation) {
    6364        m_geolocation->disconnectFrame();
    6465        m_geolocation = 0;
    6566    }
     67#endif
    6668    m_frame = 0;
    6769}
     
    147149Geolocation* Navigator::geolocation() const
    148150{
     151#if ENABLE(GEOLOCATION)
    149152    if (!m_geolocation)
    150153        m_geolocation = Geolocation::create(m_frame);
     154#endif
    151155    return m_geolocation.get();
    152156}
  • trunk/WebCore/page/PositionError.idl

    r38409 r44093  
    2727
    2828    interface [
    29         GenerateConstructor
     29        GenerateConstructor,
     30        Conditional=GEOLOCATION
    3031    ] PositionError {
    3132        readonly attribute unsigned short code;
  • trunk/WebCore/platform/GeolocationService.cpp

    r41375 r44093  
    2727#include "GeolocationService.h"
    2828
     29#if ENABLE(GEOLOCATION)
     30
    2931#include <wtf/Assertions.h>
    3032
    3133namespace WebCore {
    32 
    33 #if !ENABLE(GEOLOCATION)
    34 GeolocationService* GeolocationService::create(GeolocationServiceClient*)
    35 {
    36     return 0;
    37 }
    38 #endif
    3934
    4035GeolocationService::GeolocationService(GeolocationServiceClient* client)
     
    5550
    5651} // namespace WebCore
     52
     53#endif // ENABLE(GEOLOCATION)
Note: See TracChangeset for help on using the changeset viewer.