Exemplo n.º 1
0
void LayoutTestController::showWebInspector()
{
    WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
    WebKitWebInspector* inspector = webkit_web_view_get_inspector(webView);

    webkit_web_inspector_show(inspector);
}
Exemplo n.º 2
0
void TestRunner::showWebInspector()
{
    WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
    WebKitWebInspector* inspector = webkit_web_view_get_inspector(webView);

    webkit_web_inspector_show(inspector);
}
Exemplo n.º 3
0
static void _ghtml_inspect_url(GtkWidget * widget, char const * url)
{
	GHtml * ghtml;
	WebKitWebSettings * settings;
	WebKitWebInspector * inspector;

	ghtml = g_object_get_data(G_OBJECT(widget), "ghtml");
	if(ghtml->inspector == NULL)
	{
		settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(
					ghtml->view));
		g_object_set(settings, "enable-developer-extras", TRUE, NULL);
		surfer_open(ghtml->surfer, url);
		inspector = webkit_web_view_get_inspector(WEBKIT_WEB_VIEW(
					ghtml->view));
		g_signal_connect(G_OBJECT(inspector), "inspect-web-view",
				G_CALLBACK(_inspect_inspect), ghtml);
		g_signal_connect(G_OBJECT(inspector), "show-window", G_CALLBACK(
					_inspect_show), ghtml);
		g_signal_connect(G_OBJECT(inspector), "notify::inspected-uri",
				G_CALLBACK(_inspect_inspected_uri), ghtml);
	}
	else
	{
		surfer_open(ghtml->surfer, url);
		inspector = webkit_web_view_get_inspector(WEBKIT_WEB_VIEW(
					ghtml->view));
	}
	/* FIXME crashes (tested on NetBSD/amd64) */
	webkit_web_inspector_show(inspector);
}
Exemplo n.º 4
0
static VALUE
WebInspector_show(VALUE self)
{
  WebKitWebInspector *_self = ((WebKitWebInspector*)RVAL2GOBJ(self));

#line 157 "/home/geoff/Projects/gtk-webkit-ruby/ext/webkit/webkit.cr"
  webkit_web_inspector_show(_self);
 
  return Qnil;
}
Exemplo n.º 5
0
//add by zlf end. 2014.11.12
static gboolean toggleWebInspector(BrowserWindow *window, gpointer user_data)
{
    WebKitWebInspector *inspectorWindow;

    inspectorWindow = webkit_web_view_get_inspector(WEBKIT_WEB_VIEW(window->webView));
    if (!window->inspectorWindowIsVisible) {
        webkit_web_inspector_show(inspectorWindow);
        window->inspectorWindowIsVisible = TRUE;
    } else
        webkit_web_inspector_close(inspectorWindow);

    return TRUE;
}
Exemplo n.º 6
0
Arquivo: main.c Projeto: macrat/rusk
void toggleInspector(RuskWindow *rusk)
{
	g_object_set(G_OBJECT(webkit_web_view_get_settings(rusk->webview)), "enable-developer-extras", TRUE, NULL);

	WebKitWebInspector *inspector = webkit_web_view_get_inspector(rusk->webview);

	if(webkit_web_inspector_is_attached(inspector))
	{
		webkit_web_inspector_close(inspector);
	}else
	{
		webkit_web_inspector_show(inspector);
	}
}
Exemplo n.º 7
0
static VbResult normal_view_inspector(Client *c, const NormalCmdInfo *info)
{
    WebKitSettings *settings;

    settings = webkit_web_view_get_settings(c->webview);

    /* Try to get the inspected uri to identify if the inspector is shown at
     * the time or not. */
    if (webkit_web_inspector_is_attached(c->inspector)) {
        webkit_web_inspector_close(c->inspector);
    } else if (webkit_settings_get_enable_developer_extras(settings)) {
        webkit_web_inspector_show(c->inspector);
    } else {
        /* Inform the user on attempt to enable webinspector when the
         * developer extra are not enabled. */
        vb_echo(c, MSG_ERROR, TRUE, "webinspector is not enabled");

        return RESULT_ERROR;
    }
    return RESULT_COMPLETE;
}
Exemplo n.º 8
0
 static gboolean showIdle(InspectorTest* test)
 {
     webkit_web_inspector_show(test->m_inspector);
     return FALSE;
 }