Changeset 161556 in webkit


Ignore:
Timestamp:
Jan 9, 2014 9:19:34 AM (10 years ago)
Author:
Seokju Kwon
Message:

Web Inspector: Remove unused overriding protocols.
https://bugs.webkit.org/show_bug.cgi?id=126630

Reviewed by Timothy Hatcher.

Source/WebCore:

No new tests, No change in behavior.

Remove unused overriding protocols as these are not used anymore in Frontned.
-Page.setGeolocationOverride
-Page.clearGeolocationOverride
-Page.canOverrideGeolocation
-Page.setDeviceOrientationOverride
-Page.clearDeviceOrientationOverride
-Page.canOverrideGeolocation
-Network.setUserAgentOverride

  • Modules/geolocation/GeolocationController.cpp:

(WebCore::GeolocationController::GeolocationController):
(WebCore::GeolocationController::create):
(WebCore::GeolocationController::positionChanged):
(WebCore::provideGeolocationTo):

  • Modules/geolocation/GeolocationController.h:
  • dom/DeviceOrientationController.cpp:

(WebCore::DeviceOrientationController::DeviceOrientationController):
(WebCore::DeviceOrientationController::create):
(WebCore::DeviceOrientationController::didChangeDeviceOrientation):
(WebCore::provideDeviceOrientationTo):

  • dom/DeviceOrientationController.h:
  • inspector/InspectorInstrumentation.cpp:
  • inspector/InspectorInstrumentation.h:
  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::InspectorPageAgent):

  • inspector/InspectorPageAgent.h:
  • inspector/InspectorResourceAgent.cpp:

(WebCore::InspectorResourceAgent::disable):

  • inspector/InspectorResourceAgent.h:
  • inspector/protocol/Network.json:
  • inspector/protocol/Page.json:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::userAgent):

Source/WebInspectorUI:

Update InspectorWebBackendCommands.js after removing unused overriding protocols.

  • UserInterface/InspectorWebBackendCommands.js:
  • UserInterface/Legacy/6.0/InspectorWebBackendCommands.js:
  • UserInterface/Legacy/7.0/InspectorWebBackendCommands.js:
  • Versions/Inspector-iOS-6.0.json:
  • Versions/Inspector-iOS-7.0.json:

LayoutTests:

  • http/tests/inspector/extensions-useragent-expected.txt: Removed.
  • http/tests/inspector/extensions-useragent.html: Removed.
  • inspector/device-orientation-success-expected.txt: Removed.
  • inspector/device-orientation-success.html: Removed.
  • inspector/geolocation-error-expected.txt: Removed.
  • inspector/geolocation-error.html: Removed.
  • inspector/geolocation-success-expected.txt: Removed.
  • inspector/geolocation-success.html: Removed.
  • inspector/geolocation-watchPosition-expected.txt: Removed.
  • inspector/geolocation-watchPosition.html: Removed.
Location:
trunk
Files:
10 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r161550 r161556  
     12014-01-09  Seokju Kwon  <seokju@webkit.org>
     2
     3        Web Inspector: Remove unused overriding protocols.
     4        https://bugs.webkit.org/show_bug.cgi?id=126630
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * http/tests/inspector/extensions-useragent-expected.txt: Removed.
     9        * http/tests/inspector/extensions-useragent.html: Removed.
     10        * inspector/device-orientation-success-expected.txt: Removed.
     11        * inspector/device-orientation-success.html: Removed.
     12        * inspector/geolocation-error-expected.txt: Removed.
     13        * inspector/geolocation-error.html: Removed.
     14        * inspector/geolocation-success-expected.txt: Removed.
     15        * inspector/geolocation-success.html: Removed.
     16        * inspector/geolocation-watchPosition-expected.txt: Removed.
     17        * inspector/geolocation-watchPosition.html: Removed.
     18
    1192014-01-09  Zan Dobersek  <zdobersek@igalia.com>
    220
  • trunk/Source/WebCore/ChangeLog

    r161553 r161556  
     12014-01-09  Seokju Kwon  <seokju@webkit.org>
     2
     3        Web Inspector: Remove unused overriding protocols.
     4        https://bugs.webkit.org/show_bug.cgi?id=126630
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        No new tests, No change in behavior.
     9
     10        Remove unused overriding protocols as these are not used anymore in Frontned.
     11        -Page.setGeolocationOverride
     12        -Page.clearGeolocationOverride
     13        -Page.canOverrideGeolocation
     14        -Page.setDeviceOrientationOverride
     15        -Page.clearDeviceOrientationOverride
     16        -Page.canOverrideGeolocation
     17        -Network.setUserAgentOverride
     18
     19        * Modules/geolocation/GeolocationController.cpp:
     20        (WebCore::GeolocationController::GeolocationController):
     21        (WebCore::GeolocationController::create):
     22        (WebCore::GeolocationController::positionChanged):
     23        (WebCore::provideGeolocationTo):
     24        * Modules/geolocation/GeolocationController.h:
     25        * dom/DeviceOrientationController.cpp:
     26        (WebCore::DeviceOrientationController::DeviceOrientationController):
     27        (WebCore::DeviceOrientationController::create):
     28        (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
     29        (WebCore::provideDeviceOrientationTo):
     30        * dom/DeviceOrientationController.h:
     31        * inspector/InspectorInstrumentation.cpp:
     32        * inspector/InspectorInstrumentation.h:
     33        * inspector/InspectorPageAgent.cpp:
     34        (WebCore::InspectorPageAgent::InspectorPageAgent):
     35        * inspector/InspectorPageAgent.h:
     36        * inspector/InspectorResourceAgent.cpp:
     37        (WebCore::InspectorResourceAgent::disable):
     38        * inspector/InspectorResourceAgent.h:
     39        * inspector/protocol/Network.json:
     40        * inspector/protocol/Page.json:
     41        * loader/FrameLoader.cpp:
     42        (WebCore::FrameLoader::userAgent):
     43
    1442014-01-09  Andrei Bucur  <abucur@adobe.com>
    245
  • trunk/Source/WebCore/Modules/geolocation/GeolocationController.cpp

    r157653 r161556  
    3232#include "GeolocationError.h"
    3333#include "GeolocationPosition.h"
    34 #include "InspectorInstrumentation.h"
    3534
    3635namespace WebCore {
    3736
    38 GeolocationController::GeolocationController(Page* page, GeolocationClient* client)
     37GeolocationController::GeolocationController(GeolocationClient* client)
    3938    : m_client(client)
    40     , m_page(page)
    4139{
    4240}
     
    5048}
    5149
    52 PassOwnPtr<GeolocationController> GeolocationController::create(Page* page, GeolocationClient* client)
     50PassOwnPtr<GeolocationController> GeolocationController::create(GeolocationClient* client)
    5351{
    54     return adoptPtr(new GeolocationController(page, client));
     52    return adoptPtr(new GeolocationController(client));
    5553}
    5654
     
    102100void GeolocationController::positionChanged(GeolocationPosition* position)
    103101{
    104     position = InspectorInstrumentation::overrideGeolocationPosition(m_page, position);
    105     if (!position) {
    106         errorOccurred(GeolocationError::create(GeolocationError::PositionUnavailable, ASCIILiteral("PositionUnavailable")).get());
    107         return;
    108     }
    109102    m_lastPosition = position;
    110103    Vector<RefPtr<Geolocation>> observersVector;
     
    140133void provideGeolocationTo(Page* page, GeolocationClient* client)
    141134{
    142     Supplement<Page>::provideTo(page, GeolocationController::supplementName(), GeolocationController::create(page, client));
     135    Supplement<Page>::provideTo(page, GeolocationController::supplementName(), GeolocationController::create(client));
    143136}
    144137   
  • trunk/Source/WebCore/Modules/geolocation/GeolocationController.h

    r157653 r161556  
    4747    ~GeolocationController();
    4848
    49     static PassOwnPtr<GeolocationController> create(Page*, GeolocationClient*);
     49    static PassOwnPtr<GeolocationController> create(GeolocationClient*);
    5050
    5151    void addObserver(Geolocation*, bool enableHighAccuracy);
     
    6666
    6767private:
    68     GeolocationController(Page*, GeolocationClient*);
     68    GeolocationController(GeolocationClient*);
    6969
    7070    GeolocationClient* m_client;
    71     Page* m_page;
    7271
    7372    RefPtr<GeolocationPosition> m_lastPosition;
  • trunk/Source/WebCore/dom/DeviceOrientationController.cpp

    r160679 r161556  
    3131#include "DeviceOrientationData.h"
    3232#include "DeviceOrientationEvent.h"
    33 #include "InspectorInstrumentation.h"
     33#include "Page.h"
    3434
    3535namespace WebCore {
    3636
    37 DeviceOrientationController::DeviceOrientationController(Page* page, DeviceOrientationClient* client)
     37DeviceOrientationController::DeviceOrientationController(DeviceOrientationClient* client)
    3838    : DeviceController(client)
    39     , m_page(page)
    4039{
    4140#if PLATFORM(IOS)
     
    5150}
    5251
    53 PassOwnPtr<DeviceOrientationController> DeviceOrientationController::create(Page* page, DeviceOrientationClient* client)
     52PassOwnPtr<DeviceOrientationController> DeviceOrientationController::create(DeviceOrientationClient* client)
    5453{
    55     return adoptPtr(new DeviceOrientationController(page, client));
     54    return adoptPtr(new DeviceOrientationController(client));
    5655}
    5756
    5857void DeviceOrientationController::didChangeDeviceOrientation(DeviceOrientationData* orientation)
    5958{
    60     orientation = InspectorInstrumentation::overrideDeviceOrientation(m_page, orientation);
    6159    dispatchDeviceEvent(DeviceOrientationEvent::create(eventNames().deviceorientationEvent, orientation));
    6260}
     
    112110void provideDeviceOrientationTo(Page* page, DeviceOrientationClient* client)
    113111{
    114     DeviceOrientationController::provideTo(page, DeviceOrientationController::supplementName(), DeviceOrientationController::create(page, client));
     112    DeviceOrientationController::provideTo(page, DeviceOrientationController::supplementName(), DeviceOrientationController::create(client));
    115113}
    116114
  • trunk/Source/WebCore/dom/DeviceOrientationController.h

    r160679 r161556  
    3636class DeviceOrientationClient;
    3737class DeviceOrientationData;
     38class Page;
    3839
    3940class DeviceOrientationController : public DeviceController {
     
    4243    ~DeviceOrientationController() { };
    4344
    44     static PassOwnPtr<DeviceOrientationController> create(Page*, DeviceOrientationClient*);
     45    static PassOwnPtr<DeviceOrientationController> create(DeviceOrientationClient*);
    4546
    4647    void didChangeDeviceOrientation(DeviceOrientationData*);
     
    6263
    6364private:
    64     DeviceOrientationController(Page*, DeviceOrientationClient*);
    65 
    66     Page* m_page;
     65    DeviceOrientationController(DeviceOrientationClient*);
    6766};
    6867
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r161477 r161556  
    4242#include "DOMWrapperWorld.h"
    4343#include "Database.h"
    44 #include "DeviceOrientationData.h"
    4544#include "DocumentLoader.h"
    4645#include "Event.h"
     
    620619}
    621620
    622 void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents* instrumentingAgents, String* userAgent)
    623 {
    624     if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
    625         resourceAgent->applyUserAgentOverride(userAgent);
    626 }
    627 
    628621void InspectorInstrumentation::applyEmulatedMediaImpl(InstrumentingAgents* instrumentingAgents, String* media)
    629622{
     
    12991292}
    13001293
    1301 #if ENABLE(GEOLOCATION)
    1302 GeolocationPosition* InspectorInstrumentation::overrideGeolocationPositionImpl(InstrumentingAgents* instrumentingAgents, GeolocationPosition* position)
    1303 {
    1304     if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())
    1305         position = pageAgent->overrideGeolocationPosition(position);
    1306     return position;
    1307 }
    1308 #endif
    1309 
    1310 DeviceOrientationData* InspectorInstrumentation::overrideDeviceOrientationImpl(InstrumentingAgents* instrumentingAgents, DeviceOrientationData* deviceOrientation)
    1311 {
    1312     if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())
    1313         deviceOrientation = pageAgent->overrideDeviceOrientation(deviceOrientation);
    1314     return deviceOrientation;
    1315 }
    1316 
    13171294#if USE(ACCELERATED_COMPOSITING)
    13181295void InspectorInstrumentation::layerTreeDidChangeImpl(InstrumentingAgents* instrumentingAgents)
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r161477 r161556  
    6262class DocumentLoader;
    6363class DocumentStyleSheetCollection;
    64 class DeviceOrientationData;
    65 class GeolocationPosition;
    6664class GraphicsContext;
    6765class HTTPHeaderMap;
     
    186184    static void didProcessRule(const InspectorInstrumentationCookie&);
    187185
    188     static void applyUserAgentOverride(Frame*, String*);
    189186    static void applyEmulatedMedia(Frame*, String*);
    190187    static void willSendRequest(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
     
    299296#endif
    300297
    301 #if ENABLE(GEOLOCATION)
    302     static GeolocationPosition* overrideGeolocationPosition(Page*, GeolocationPosition*);
    303 #endif
    304 
    305298    static void registerInstrumentingAgents(InstrumentingAgents*);
    306299    static void unregisterInstrumentingAgents(InstrumentingAgents*);
    307 
    308     static DeviceOrientationData* overrideDeviceOrientation(Page*, DeviceOrientationData*);
    309300
    310301#if USE(ACCELERATED_COMPOSITING)
     
    383374    static void didProcessRuleImpl(const InspectorInstrumentationCookie&);
    384375
    385     static void applyUserAgentOverrideImpl(InstrumentingAgents*, String*);
    386376    static void applyEmulatedMediaImpl(InstrumentingAgents*, String*);
    387377    static void willSendRequestImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
     
    486476    static InspectorTimelineAgent* retrieveTimelineAgent(const InspectorInstrumentationCookie&);
    487477
    488 #if ENABLE(GEOLOCATION)
    489     static GeolocationPosition* overrideGeolocationPositionImpl(InstrumentingAgents*, GeolocationPosition*);
    490 #endif
    491 
    492     static DeviceOrientationData* overrideDeviceOrientationImpl(InstrumentingAgents*, DeviceOrientationData*);
    493 
    494478#if USE(ACCELERATED_COMPOSITING)
    495479    static void layerTreeDidChangeImpl(InstrumentingAgents*);
     
    12591243#else
    12601244    UNUSED_PARAM(cookie);
    1261 #endif
    1262 }
    1263 
    1264 inline void InspectorInstrumentation::applyUserAgentOverride(Frame* frame, String* userAgent)
    1265 {
    1266 #if ENABLE(INSPECTOR)
    1267     FAST_RETURN_IF_NO_FRONTENDS(void());
    1268     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
    1269         applyUserAgentOverrideImpl(instrumentingAgents, userAgent);
    1270 #else
    1271     UNUSED_PARAM(frame);
    1272     UNUSED_PARAM(userAgent);
    12731245#endif
    12741246}
     
    19561928}
    19571929
    1958 #if ENABLE(GEOLOCATION)
    1959 inline GeolocationPosition* InspectorInstrumentation::overrideGeolocationPosition(Page* page, GeolocationPosition* position)
    1960 {
    1961 #if ENABLE(INSPECTOR)
    1962     FAST_RETURN_IF_NO_FRONTENDS(position);
    1963     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
    1964         return overrideGeolocationPositionImpl(instrumentingAgents, position);
    1965 #else
    1966     UNUSED_PARAM(page);
    1967 #endif
    1968     return position;
    1969 }
    1970 #endif
    1971 
    1972 inline DeviceOrientationData* InspectorInstrumentation::overrideDeviceOrientation(Page* page, DeviceOrientationData* deviceOrientation)
    1973 {
    1974 #if ENABLE(INSPECTOR)
    1975     FAST_RETURN_IF_NO_FRONTENDS(deviceOrientation);
    1976     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
    1977         return overrideDeviceOrientationImpl(instrumentingAgents, deviceOrientation);
    1978 #else
    1979     UNUSED_PARAM(page);
    1980 #endif
    1981     return deviceOrientation;
    1982 }
    1983 
    19841930#if USE(ACCELERATED_COMPOSITING)
    19851931inline void InspectorInstrumentation::layerTreeDidChange(Page* page)
  • trunk/Source/WebCore/inspector/InspectorPageAgent.cpp

    r161477 r161556  
    4747#include "DOMPatchSupport.h"
    4848#include "DOMWrapperWorld.h"
    49 #include "DeviceOrientationController.h"
    5049#include "Document.h"
    5150#include "DocumentLoader.h"
     
    5453#include "FrameSnapshotting.h"
    5554#include "FrameView.h"
    56 #include "GeolocationController.h"
    57 #include "GeolocationError.h"
    5855#include "HTMLFrameOwnerElement.h"
    5956#include "HTMLNames.h"
     
    364361    , m_isFirstLayoutAfterOnLoad(false)
    365362    , m_originalScriptExecutionDisabled(false)
    366     , m_geolocationOverridden(false)
    367363    , m_ignoreScriptsEnabledNotification(false)
    368364    , m_showPaintRects(false)
     
    10331029#endif
    10341030
    1035 void InspectorPageAgent::setGeolocationOverride(ErrorString* error, const double* latitude, const double* longitude, const double* accuracy)
    1036 {
    1037 #if ENABLE (GEOLOCATION)
    1038     GeolocationController* controller = GeolocationController::from(m_page);
    1039     GeolocationPosition* position = 0;
    1040     if (!controller) {
    1041         *error = "Internal error: unable to override geolocation";
    1042         return;
    1043     }
    1044     position = controller->lastPosition();
    1045     if (!m_geolocationOverridden && position)
    1046         m_platformGeolocationPosition = position;
    1047 
    1048     m_geolocationOverridden = true;
    1049     if (latitude && longitude && accuracy)
    1050         m_geolocationPosition = GeolocationPosition::create(currentTimeMS(), *latitude, *longitude, *accuracy);
    1051     else
    1052         m_geolocationPosition.clear();
    1053 
    1054     controller->positionChanged(0); // Kick location update.
    1055 #else
    1056     *error = "Geolocation is not available";
    1057     UNUSED_PARAM(latitude);
    1058     UNUSED_PARAM(longitude);
    1059     UNUSED_PARAM(accuracy);
    1060 #endif
    1061 }
    1062 
    1063 void InspectorPageAgent::clearGeolocationOverride(ErrorString* error)
    1064 {
    1065     if (!m_geolocationOverridden)
    1066         return;
    1067 #if ENABLE(GEOLOCATION)
    1068     UNUSED_PARAM(error);
    1069     m_geolocationOverridden = false;
    1070     m_geolocationPosition.clear();
    1071 
    1072     GeolocationController* controller = GeolocationController::from(m_page);
    1073     if (controller && m_platformGeolocationPosition.get())
    1074         controller->positionChanged(m_platformGeolocationPosition.get());
    1075 #else
    1076     *error = "Geolocation is not available";
    1077 #endif
    1078 }
    1079 
    1080 void InspectorPageAgent::canOverrideGeolocation(ErrorString*, bool* out_param)
    1081 {
    1082 #if ENABLE(GEOLOCATION)
    1083     *out_param = true;
    1084 #else
    1085     *out_param = false;
    1086 #endif
    1087 }
    1088 
    1089 GeolocationPosition* InspectorPageAgent::overrideGeolocationPosition(GeolocationPosition* position)
    1090 {
    1091     if (m_geolocationOverridden) {
    1092         if (position)
    1093             m_platformGeolocationPosition = position;
    1094         return m_geolocationPosition.get();
    1095     }
    1096     return position;
    1097 }
    1098 
    1099 void InspectorPageAgent::setDeviceOrientationOverride(ErrorString* error, double alpha, double beta, double gamma)
    1100 {
    1101     DeviceOrientationController* controller = DeviceOrientationController::from(m_page);
    1102     if (!controller) {
    1103         *error = "Internal error: unable to override device orientation";
    1104         return;
    1105     }
    1106 
    1107     ErrorString clearError;
    1108     clearDeviceOrientationOverride(&clearError);
    1109 
    1110     m_deviceOrientation = DeviceOrientationData::create(true, alpha, true, beta, true, gamma);
    1111     controller->didChangeDeviceOrientation(m_deviceOrientation.get());
    1112 }
    1113 
    1114 void InspectorPageAgent::clearDeviceOrientationOverride(ErrorString*)
    1115 {
    1116     m_deviceOrientation.clear();
    1117 }
    1118 
    1119 void InspectorPageAgent::canOverrideDeviceOrientation(ErrorString*, bool* outParam)
    1120 {
    1121 #if ENABLE(DEVICE_ORIENTATION)
    1122     *outParam = true;
    1123 #else
    1124     *outParam = false;
    1125 #endif
    1126 }
    1127 
    1128 DeviceOrientationData* InspectorPageAgent::overrideDeviceOrientation(DeviceOrientationData* deviceOrientation)
    1129 {
    1130     if (m_deviceOrientation)
    1131         deviceOrientation = m_deviceOrientation.get();
    1132     return deviceOrientation;
    1133 }
    1134 
    11351031void InspectorPageAgent::setTouchEmulationEnabled(ErrorString* error, bool enabled)
    11361032{
  • trunk/Source/WebCore/inspector/InspectorPageAgent.h

    r161477 r161556  
    3434#if ENABLE(INSPECTOR)
    3535
    36 #include "DeviceOrientationData.h"
    37 #include "GeolocationPosition.h"
    3836#include "InspectorWebAgentBase.h"
    3937#include "InspectorWebBackendDispatchers.h"
     
    122120    virtual void getScriptExecutionStatus(ErrorString*, Inspector::InspectorPageBackendDispatcherHandler::Result::Enum*);
    123121    virtual void setScriptExecutionDisabled(ErrorString*, bool);
    124     virtual void setGeolocationOverride(ErrorString*, const double*, const double*, const double*);
    125     virtual void clearGeolocationOverride(ErrorString*);
    126     virtual void canOverrideGeolocation(ErrorString*, bool* out_param);
    127     virtual void setDeviceOrientationOverride(ErrorString*, double, double, double);
    128     virtual void clearDeviceOrientationOverride(ErrorString*);
    129     virtual void canOverrideDeviceOrientation(ErrorString*, bool*);
    130122    virtual void setTouchEmulationEnabled(ErrorString*, bool);
    131123    virtual void setEmulatedMedia(ErrorString*, const String&);
     
    136128    virtual void handleJavaScriptDialog(ErrorString*, bool accept, const String* promptText);
    137129    virtual void archive(ErrorString*, String* data);
    138 
    139     // Geolocation override helpers.
    140     GeolocationPosition* overrideGeolocationPosition(GeolocationPosition*);
    141 
    142     // DeviceOrientation helper
    143     DeviceOrientationData* overrideDeviceOrientation(DeviceOrientationData*);
    144130
    145131    // InspectorInstrumentation API
     
    209195    bool m_isFirstLayoutAfterOnLoad;
    210196    bool m_originalScriptExecutionDisabled;
    211     bool m_geolocationOverridden;
    212197    bool m_ignoreScriptsEnabledNotification;
    213198    bool m_showPaintRects;
    214199    String m_emulatedMedia;
    215200    RefPtr<Inspector::InspectorObject> m_scriptsToEvaluateOnLoad;
    216     RefPtr<GeolocationPosition> m_geolocationPosition;
    217     RefPtr<GeolocationPosition> m_platformGeolocationPosition;
    218     RefPtr<DeviceOrientationData> m_deviceOrientation;
    219201};
    220202
  • trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp

    r160557 r161556  
    419419}
    420420
    421 void InspectorResourceAgent::applyUserAgentOverride(String* userAgent)
    422 {
    423     if (!m_userAgentOverride.isNull())
    424         *userAgent = m_userAgentOverride;
    425 }
    426 
    427421void InspectorResourceAgent::willRecalculateStyle()
    428422{
     
    543537{
    544538    m_enabled = false;
    545     m_userAgentOverride = String();
    546539    m_instrumentingAgents->setInspectorResourceAgent(0);
    547540    m_resourcesData->clear();
    548541    m_extraRequestHeaders.clear();
    549 }
    550 
    551 void InspectorResourceAgent::setUserAgentOverride(ErrorString*, const String& userAgent)
    552 {
    553     m_userAgentOverride = userAgent;
    554542}
    555543
  • trunk/Source/WebCore/inspector/InspectorResourceAgent.h

    r160557 r161556  
    109109    void willDestroyCachedResource(CachedResource*);
    110110
    111     void applyUserAgentOverride(String* userAgent);
    112 
    113111    // FIXME: InspectorResourceAgent should now be aware of style recalculation.
    114112    void willRecalculateStyle();
     
    134132    virtual void enable(ErrorString*);
    135133    virtual void disable(ErrorString*);
    136     virtual void setUserAgentOverride(ErrorString*, const String& userAgent);
    137134    virtual void setExtraHTTPHeaders(ErrorString*, const RefPtr<Inspector::InspectorObject>&);
    138135    virtual void getResponseBody(ErrorString*, const String& requestId, String* content, bool* base64Encoded);
     
    155152    std::unique_ptr<Inspector::InspectorNetworkFrontendDispatcher> m_frontendDispatcher;
    156153    RefPtr<Inspector::InspectorNetworkBackendDispatcher> m_backendDispatcher;
    157     String m_userAgentOverride;
    158154    OwnPtr<NetworkResourcesData> m_resourcesData;
    159155    bool m_enabled;
  • trunk/Source/WebCore/inspector/protocol/Network.json

    r159233 r161556  
    139139        },
    140140        {
    141             "name": "setUserAgentOverride",
    142             "description": "Allows overriding user agent with the given string.",
    143             "parameters": [
    144                 { "name": "userAgent", "type": "string", "description": "User agent to use." }
    145             ]
    146         },
    147         {
    148141            "name": "setExtraHTTPHeaders",
    149142            "description": "Specifies whether to always send extra HTTP headers with the requests from this page.",
  • trunk/Source/WebCore/inspector/protocol/Page.json

    r161402 r161556  
    256256        },
    257257        {
    258             "name": "setGeolocationOverride",
    259             "description": "Overrides the Geolocation Position or Error.",
    260             "parameters": [
    261                 { "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"},
    262                 { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"},
    263                 { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"}
    264             ]
    265         },
    266         {
    267             "name": "clearGeolocationOverride",
    268             "description": "Clears the overriden Geolocation Position and Error."
    269         },
    270         {
    271             "name": "canOverrideGeolocation",
    272             "description": "Checks if Geolocation can be overridden.",
    273             "returns": [
    274                 { "name": "result", "type": "boolean", "description": "True if browser can ovrride Geolocation." }
    275             ]
    276         },
    277         {
    278             "name": "setDeviceOrientationOverride",
    279             "description": "Overrides the Device Orientation.",
    280             "parameters": [
    281                 { "name": "alpha", "type": "number", "description": "Mock alpha"},
    282                 { "name": "beta", "type": "number", "description": "Mock beta"},
    283                 { "name": "gamma", "type": "number", "description": "Mock gamma"}
    284             ]
    285         },
    286         {
    287             "name": "clearDeviceOrientationOverride",
    288             "description": "Clears the overridden Device Orientation."
    289         },
    290         {
    291             "name": "canOverrideDeviceOrientation",
    292             "description": "Check the backend if Web Inspector can override the device orientation.",
    293             "returns": [
    294                 { "name": "result", "type": "boolean", "description": "If true, <code>setDeviceOrientationOverride</code> can safely be invoked on the agent." }
    295             ]
    296         },
    297         {
    298258            "name": "setTouchEmulationEnabled",
    299259            "parameters": [
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r161127 r161556  
    24882488String FrameLoader::userAgent(const URL& url) const
    24892489{
    2490     String userAgent = m_client.userAgent(url);
    2491     InspectorInstrumentation::applyUserAgentOverride(&m_frame, &userAgent);
    2492     return userAgent;
     2490    return m_client.userAgent(url);
    24932491}
    24942492
  • trunk/Source/WebInspectorUI/ChangeLog

    r161460 r161556  
     12014-01-09  Seokju Kwon  <seokju@webkit.org>
     2
     3        Web Inspector: Remove unused overriding protocols.
     4        https://bugs.webkit.org/show_bug.cgi?id=126630
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Update InspectorWebBackendCommands.js after removing unused overriding protocols.
     9
     10        * UserInterface/InspectorWebBackendCommands.js:
     11        * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js:
     12        * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js:
     13        * Versions/Inspector-iOS-6.0.json:
     14        * Versions/Inspector-iOS-7.0.json:
     15
    1162014-01-07  Joseph Pecoraro  <pecoraro@apple.com>
    217
  • trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js

    r161402 r161556  
    223223InspectorBackend.registerCommand("Network.enable", [], []);
    224224InspectorBackend.registerCommand("Network.disable", [], []);
    225 InspectorBackend.registerCommand("Network.setUserAgentOverride", [{"name": "userAgent", "type": "string", "optional": false}], []);
    226225InspectorBackend.registerCommand("Network.setExtraHTTPHeaders", [{"name": "headers", "type": "object", "optional": false}], []);
    227226InspectorBackend.registerCommand("Network.getResponseBody", [{"name": "requestId", "type": "string", "optional": false}], ["body", "base64Encoded"]);
     
    270269InspectorBackend.registerCommand("Page.getScriptExecutionStatus", [], ["result"]);
    271270InspectorBackend.registerCommand("Page.setScriptExecutionDisabled", [{"name": "value", "type": "boolean", "optional": false}], []);
    272 InspectorBackend.registerCommand("Page.setGeolocationOverride", [{"name": "latitude", "type": "number", "optional": true}, {"name": "longitude", "type": "number", "optional": true}, {"name": "accuracy", "type": "number", "optional": true}], []);
    273 InspectorBackend.registerCommand("Page.clearGeolocationOverride", [], []);
    274 InspectorBackend.registerCommand("Page.canOverrideGeolocation", [], ["result"]);
    275 InspectorBackend.registerCommand("Page.setDeviceOrientationOverride", [{"name": "alpha", "type": "number", "optional": false}, {"name": "beta", "type": "number", "optional": false}, {"name": "gamma", "type": "number", "optional": false}], []);
    276 InspectorBackend.registerCommand("Page.clearDeviceOrientationOverride", [], []);
    277 InspectorBackend.registerCommand("Page.canOverrideDeviceOrientation", [], ["result"]);
    278271InspectorBackend.registerCommand("Page.setTouchEmulationEnabled", [{"name": "enabled", "type": "boolean", "optional": false}], []);
    279272InspectorBackend.registerCommand("Page.setEmulatedMedia", [{"name": "media", "type": "string", "optional": false}], []);
  • trunk/Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorWebBackendCommands.js

    r161402 r161556  
    8989InspectorBackend.registerCommand("Network.enable", [], []);
    9090InspectorBackend.registerCommand("Network.disable", [], []);
    91 InspectorBackend.registerCommand("Network.setUserAgentOverride", [{"name": "userAgent", "type": "string", "optional": false}], []);
    9291InspectorBackend.registerCommand("Network.setExtraHTTPHeaders", [{"name": "headers", "type": "object", "optional": false}], []);
    9392InspectorBackend.registerCommand("Network.getResponseBody", [{"name": "requestId", "type": "string", "optional": false}], ["body", "base64Encoded"]);
  • trunk/Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorWebBackendCommands.js

    r161402 r161556  
    5656InspectorBackend.registerCommand("Page.getScriptExecutionStatus", [], ["result"]);
    5757InspectorBackend.registerCommand("Page.setScriptExecutionDisabled", [{"name": "value", "type": "boolean", "optional": false}], []);
    58 InspectorBackend.registerCommand("Page.setGeolocationOverride", [{"name": "latitude", "type": "number", "optional": true}, {"name": "longitude", "type": "number", "optional": true}, {"name": "accuracy", "type": "number", "optional": true}], []);
    59 InspectorBackend.registerCommand("Page.clearGeolocationOverride", [], []);
    60 InspectorBackend.registerCommand("Page.canOverrideGeolocation", [], ["result"]);
    61 InspectorBackend.registerCommand("Page.setDeviceOrientationOverride", [{"name": "alpha", "type": "number", "optional": false}, {"name": "beta", "type": "number", "optional": false}, {"name": "gamma", "type": "number", "optional": false}], []);
    62 InspectorBackend.registerCommand("Page.clearDeviceOrientationOverride", [], []);
    63 InspectorBackend.registerCommand("Page.canOverrideDeviceOrientation", [], ["result"]);
    6458InspectorBackend.registerCommand("Page.setTouchEmulationEnabled", [{"name": "enabled", "type": "boolean", "optional": false}], []);
    6559InspectorBackend.registerCommand("Page.setEmulatedMedia", [{"name": "media", "type": "string", "optional": false}], []);
     
    120114InspectorBackend.registerCommand("Network.enable", [], []);
    121115InspectorBackend.registerCommand("Network.disable", [], []);
    122 InspectorBackend.registerCommand("Network.setUserAgentOverride", [{"name": "userAgent", "type": "string", "optional": false}], []);
    123116InspectorBackend.registerCommand("Network.setExtraHTTPHeaders", [{"name": "headers", "type": "object", "optional": false}], []);
    124117InspectorBackend.registerCommand("Network.getResponseBody", [{"name": "requestId", "type": "string", "optional": false}], ["body", "base64Encoded"]);
  • trunk/Source/WebInspectorUI/Versions/Inspector-iOS-6.0.json

    r161402 r161556  
    714714                "name": "disable",
    715715                "description": "Disables network tracking, prevents network events from being sent to the client."
    716             },
    717             {
    718                 "name": "setUserAgentOverride",
    719                 "description": "Allows overriding user agent with the given string.",
    720                 "parameters": [
    721                     { "name": "userAgent", "type": "string", "description": "User agent to use." }
    722                 ]
    723716            },
    724717            {
  • trunk/Source/WebInspectorUI/Versions/Inspector-iOS-7.0.json

    r161402 r161556  
    327327            },
    328328            {
    329                 "name": "setGeolocationOverride",
    330                 "description": "Overrides the Geolocation Position or Error.",
    331                 "parameters": [
    332                     { "name": "latitude", "type": "number", "optional": true, "description": "Mock longitude"},
    333                     { "name": "longitude", "type": "number", "optional": true, "description": "Mock latitude"},
    334                     { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"}
    335                 ]
    336             },
    337             {
    338                 "name": "clearGeolocationOverride",
    339                 "description": "Clears the overriden Geolocation Position and Error."
    340             },
    341             {
    342                 "name": "canOverrideGeolocation",
    343                 "description": "Checks if Geolocation can be overridden.",
    344                 "returns": [
    345                     { "name": "result", "type": "boolean", "description": "True if browser can ovrride Geolocation." }
    346                 ]
    347             },
    348             {
    349                 "name": "setDeviceOrientationOverride",
    350                 "description": "Overrides the Device Orientation.",
    351                 "parameters": [
    352                     { "name": "alpha", "type": "number", "description": "Mock alpha"},
    353                     { "name": "beta", "type": "number", "description": "Mock beta"},
    354                     { "name": "gamma", "type": "number", "description": "Mock gamma"}
    355                 ]
    356             },
    357             {
    358                 "name": "clearDeviceOrientationOverride",
    359                 "description": "Clears the overridden Device Orientation."
    360             },
    361             {
    362                 "name": "canOverrideDeviceOrientation",
    363                 "description": "Check the backend if Web Inspector can override the device orientation.",
    364                 "returns": [
    365                     { "name": "result", "type": "boolean", "description": "If true, <code>setDeviceOrientationOverride</code> can safely be invoked on the agent." }
    366                 ]
    367             },
    368             {
    369329                "name": "setTouchEmulationEnabled",
    370330                "parameters": [
     
    917877                "name": "disable",
    918878                "description": "Disables network tracking, prevents network events from being sent to the client."
    919             },
    920             {
    921                 "name": "setUserAgentOverride",
    922                 "description": "Allows overriding user agent with the given string.",
    923                 "parameters": [
    924                     { "name": "userAgent", "type": "string", "description": "User agent to use." }
    925                 ]
    926879            },
    927880            {
Note: See TracChangeset for help on using the changeset viewer.