Changeset 73702 in webkit


Ignore:
Timestamp:
Dec 10, 2010 2:27:03 AM (13 years ago)
Author:
kov@webkit.org
Message:

2010-12-09 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Reviewed by Martin Robinson.

[GTK] Split webkitprivate.{cpp,h} in more manageable chunks
https://bugs.webkit.org/show_bug.cgi?id=50698

Split private bits of WebKitWebInspector to its own private
header, and to its implementation file.

  • WebCoreSupport/InspectorClientGtk.cpp:
  • webkit/webkitprivate.cpp:
  • webkit/webkitprivate.h:
  • webkit/webkitwebinspector.cpp: (isSchemaAvailable): (inspectorGSettings):
  • webkit/webkitwebinspectorprivate.h: Added.
  • webkit/webkitwebview.cpp:
Location:
trunk/WebKit/gtk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r73701 r73702  
     12010-12-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] Split webkitprivate.{cpp,h} in more manageable chunks
     6        https://bugs.webkit.org/show_bug.cgi?id=50698
     7
     8        Split private bits of WebKitWebInspector to its own private
     9        header, and to its implementation file.
     10
     11        * WebCoreSupport/InspectorClientGtk.cpp:
     12        * webkit/webkitprivate.cpp:
     13        * webkit/webkitprivate.h:
     14        * webkit/webkitwebinspector.cpp:
     15        (isSchemaAvailable):
     16        (inspectorGSettings):
     17        * webkit/webkitwebinspectorprivate.h: Added.
     18        * webkit/webkitwebview.cpp:
     19
    1202010-12-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
    221
  • trunk/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp

    r73539 r73702  
    2828#include "webkitversion.h"
    2929#include "webkitwebinspector.h"
     30#include "webkitwebinspectorprivate.h"
    3031#include "webkitwebview.h"
    3132#include "webkitwebviewprivate.h"
  • trunk/WebKit/gtk/webkit/webkitprivate.cpp

    r73701 r73702  
    172172}
    173173
    174 #ifdef HAVE_GSETTINGS
    175 static bool isSchemaAvailable(const char* schemaID)
    176 {
    177     const char* const* availableSchemas = g_settings_list_schemas();
    178     char* const* iter = const_cast<char* const*>(availableSchemas);
    179 
    180     while (*iter) {
    181         if (g_str_equal(schemaID, *iter))
    182             return true;
    183         iter++;
    184     }
    185 
    186     return false;
    187 }
    188 
    189 GSettings* inspectorGSettings()
    190 {
    191     static GSettings* settings = 0;
    192 
    193     if (settings)
    194         return settings;
    195 
    196     const gchar* schemaID = "org.webkitgtk-"WEBKITGTK_API_VERSION_STRING".inspector";
    197 
    198     // Unfortunately GSettings will abort the process execution if the
    199     // schema is not installed, which is the case for when running
    200     // tests, or even the introspection dump at build time, so check
    201     // if we have the schema before trying to initialize it.
    202     if (!isSchemaAvailable(schemaID)) {
    203         g_warning("GSettings schema not found - settings will not be used or saved.");
    204         return 0;
    205     }
    206 
    207     settings = g_settings_new(schemaID);
    208 
    209     return settings;
    210 }
    211 #endif
    212 
    213174void webkit_init()
    214175{
  • trunk/WebKit/gtk/webkit/webkitprivate.h

    r73701 r73702  
    5555#include "Geolocation.h"
    5656#include "HistoryItem.h"
    57 #include "InspectorClientGtk.h"
    5857#include "IntPoint.h"
    5958#include "IntRect.h"
     
    106105    void webkit_init();
    107106
    108 #ifdef HAVE_GSETTINGS
    109     GSettings* inspectorGSettings();
    110 #endif
    111 
    112107#define WEBKIT_PARAM_READABLE ((GParamFlags)(G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
    113108#define WEBKIT_PARAM_READWRITE ((GParamFlags)(G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
     
    179174    // end WebKitWebResource private
    180175
    181     void
    182     webkit_web_inspector_set_inspector_client(WebKitWebInspector*, WebCore::Page*);
    183 
    184     void
    185     webkit_web_inspector_set_web_view(WebKitWebInspector *web_inspector, WebKitWebView *web_view);
    186 
    187     void
    188     webkit_web_inspector_set_inspected_uri(WebKitWebInspector* web_inspector, const gchar* inspected_uri);
    189 
    190     WEBKIT_API void
    191     webkit_web_inspector_execute_script(WebKitWebInspector* inspector, long callId, const gchar* script);
    192 
    193176
    194177    WebKitWebWindowFeatures*
  • trunk/WebKit/gtk/webkit/webkitwebinspector.cpp

    r72772 r73702  
    2525#include "FocusController.h"
    2626#include "Frame.h"
    27 #include <glib/gi18n-lib.h>
    2827#include "HitTestRequest.h"
    2928#include "HitTestResult.h"
     
    3635#include "webkitmarshal.h"
    3736#include "webkitprivate.h"
     37#include "webkitwebinspectorprivate.h"
     38#include <glib/gi18n-lib.h>
    3839
    3940/**
     
    579580    priv->page->inspectorController()->evaluateForTestInFrontend(callId, script);
    580581}
     582
     583#ifdef HAVE_GSETTINGS
     584static bool isSchemaAvailable(const char* schemaID)
     585{
     586    const char* const* availableSchemas = g_settings_list_schemas();
     587    char* const* iter = const_cast<char* const*>(availableSchemas);
     588
     589    while (*iter) {
     590        if (g_str_equal(schemaID, *iter))
     591            return true;
     592        iter++;
     593    }
     594
     595    return false;
     596}
     597
     598GSettings* inspectorGSettings()
     599{
     600    static GSettings* settings = 0;
     601
     602    if (settings)
     603        return settings;
     604
     605    const gchar* schemaID = "org.webkitgtk-"WEBKITGTK_API_VERSION_STRING".inspector";
     606
     607    // Unfortunately GSettings will abort the process execution if the
     608    // schema is not installed, which is the case for when running
     609    // tests, or even the introspection dump at build time, so check
     610    // if we have the schema before trying to initialize it.
     611    if (!isSchemaAvailable(schemaID)) {
     612        g_warning("GSettings schema not found - settings will not be used or saved.");
     613        return 0;
     614    }
     615
     616    settings = g_settings_new(schemaID);
     617
     618    return settings;
     619}
     620#endif
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r73696 r73702  
    8989#include "webkitwebhistoryitem.h"
    9090#include "webkitwebinspector.h"
     91#include "webkitwebinspectorprivate.h"
    9192#include "webkitwebviewprivate.h"
    9293#include <gdk/gdkkeysyms.h>
Note: See TracChangeset for help on using the changeset viewer.