Changeset 73702 in webkit
- Timestamp:
- Dec 10, 2010 2:27:03 AM (13 years ago)
- Location:
- trunk/WebKit/gtk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/gtk/ChangeLog
r73701 r73702 1 2010-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 1 20 2010-12-09 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> 2 21 -
trunk/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
r73539 r73702 28 28 #include "webkitversion.h" 29 29 #include "webkitwebinspector.h" 30 #include "webkitwebinspectorprivate.h" 30 31 #include "webkitwebview.h" 31 32 #include "webkitwebviewprivate.h" -
trunk/WebKit/gtk/webkit/webkitprivate.cpp
r73701 r73702 172 172 } 173 173 174 #ifdef HAVE_GSETTINGS175 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 the199 // schema is not installed, which is the case for when running200 // tests, or even the introspection dump at build time, so check201 // 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 #endif212 213 174 void webkit_init() 214 175 { -
trunk/WebKit/gtk/webkit/webkitprivate.h
r73701 r73702 55 55 #include "Geolocation.h" 56 56 #include "HistoryItem.h" 57 #include "InspectorClientGtk.h"58 57 #include "IntPoint.h" 59 58 #include "IntRect.h" … … 106 105 void webkit_init(); 107 106 108 #ifdef HAVE_GSETTINGS109 GSettings* inspectorGSettings();110 #endif111 112 107 #define WEBKIT_PARAM_READABLE ((GParamFlags)(G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB)) 113 108 #define WEBKIT_PARAM_READWRITE ((GParamFlags)(G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB)) … … 179 174 // end WebKitWebResource private 180 175 181 void182 webkit_web_inspector_set_inspector_client(WebKitWebInspector*, WebCore::Page*);183 184 void185 webkit_web_inspector_set_web_view(WebKitWebInspector *web_inspector, WebKitWebView *web_view);186 187 void188 webkit_web_inspector_set_inspected_uri(WebKitWebInspector* web_inspector, const gchar* inspected_uri);189 190 WEBKIT_API void191 webkit_web_inspector_execute_script(WebKitWebInspector* inspector, long callId, const gchar* script);192 193 176 194 177 WebKitWebWindowFeatures* -
trunk/WebKit/gtk/webkit/webkitwebinspector.cpp
r72772 r73702 25 25 #include "FocusController.h" 26 26 #include "Frame.h" 27 #include <glib/gi18n-lib.h>28 27 #include "HitTestRequest.h" 29 28 #include "HitTestResult.h" … … 36 35 #include "webkitmarshal.h" 37 36 #include "webkitprivate.h" 37 #include "webkitwebinspectorprivate.h" 38 #include <glib/gi18n-lib.h> 38 39 39 40 /** … … 579 580 priv->page->inspectorController()->evaluateForTestInFrontend(callId, script); 580 581 } 582 583 #ifdef HAVE_GSETTINGS 584 static 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 598 GSettings* 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 89 89 #include "webkitwebhistoryitem.h" 90 90 #include "webkitwebinspector.h" 91 #include "webkitwebinspectorprivate.h" 91 92 #include "webkitwebviewprivate.h" 92 93 #include <gdk/gdkkeysyms.h>
Note: See TracChangeset
for help on using the changeset viewer.