Changeset 96133 in webkit


Ignore:
Timestamp:
Sep 27, 2011 11:06:06 AM (13 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Add WebKitWebContext to GTK API
https://bugs.webkit.org/show_bug.cgi?id=67931

Reviewed by Philippe Normand.

Initial implementation of WebKitWebContext for WebKit2 GTK API.

  • GNUmakefile.am: Add new files to compilation.
  • UIProcess/API/gtk/WebKitWebContext.cpp: Added.

(webkitWebContextFinalize):
(webkit_web_context_init):
(webkit_web_context_class_init):
(createDefaultWebContext):
(webkit_web_context_get_default):

  • UIProcess/API/gtk/WebKitWebContext.h: Added.
  • UIProcess/API/gtk/tests/testwebcontext.c:

(testWebContextDefault):
(main):

  • UIProcess/API/gtk/webkit2.h: Add <webkit2/WebKitWebContext.h>.
Location:
trunk/Source/WebKit2
Files:
3 added
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r96126 r96133  
     12011-09-27  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3
     4        [GTK] Add WebKitWebContext to GTK API
     5        https://bugs.webkit.org/show_bug.cgi?id=67931
     6
     7        Reviewed by Philippe Normand.
     8
     9        Initial implementation of WebKitWebContext for WebKit2 GTK API.
     10
     11        * GNUmakefile.am: Add new files to compilation.
     12        * UIProcess/API/gtk/WebKitWebContext.cpp: Added.
     13        (webkitWebContextFinalize):
     14        (webkit_web_context_init):
     15        (webkit_web_context_class_init):
     16        (createDefaultWebContext):
     17        (webkit_web_context_get_default):
     18        * UIProcess/API/gtk/WebKitWebContext.h: Added.
     19        * UIProcess/API/gtk/tests/testwebcontext.c:
     20        (testWebContextDefault):
     21        (main):
     22        * UIProcess/API/gtk/webkit2.h: Add <webkit2/WebKitWebContext.h>.
     23
    1242011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
    225
  • trunk/Source/WebKit2/GNUmakefile.am

    r96121 r96133  
    7070libwebkit2gtkincludedir = $(libwebkitgtkincludedir)/webkit2
    7171libwebkit2gtkinclude_HEADERS = \
     72        $(WebKit2)/UIProcess/API/gtk/WebKitWebContext.h \
    7273        $(WebKit2)/UIProcess/API/gtk/WebKitWebView.h \
    7374        $(WebKit2)/UIProcess/API/gtk/WebKitWebViewBase.h \
     
    453454        Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h \
    454455        Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp \
     456        Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h \
     457        Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp \
    455458        Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h \
    456459        Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp \
     
    983986        $(top_builddir)/WebKit2/webkit2gtk-@WEBKITGTK_API_VERSION@.pc
    984987
     988# Unit tests
     989TEST_PROGS += \
     990        Programs/unittests/webkit2/testwebcontext
     991
     992noinst_PROGRAMS += $(TEST_PROGS)
     993webkit2_tests_cflags = \
     994        -I$(srcdir)/Source \
     995        -I$(srcdir)/Source/WebKit2 \
     996        -I$(top_builddir)/DerivedSources/WebKit2/include \
     997        -I$(top_builddir)/DerivedSources/WebKit2/include/webkit2gtk \
     998        -I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \
     999        $(global_cflags) \
     1000        $(global_cppflags) \
     1001        $(GLIB_CFLAGS) \
     1002        $(GTK_CFLAGS) \
     1003        $(LIBSOUP_CFLAGS)
     1004
     1005webkit2_tests_ldadd = \
     1006        libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
     1007        libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
     1008        $(GLIB_LIBS) \
     1009        $(GTK_LIBS) \
     1010        $(LIBSOUP_LIBS)
     1011
     1012webkit2_tests_ldflags = \
     1013        -no-install \
     1014        -no-fast-install
     1015
     1016Programs_unittests_webkit2_testwebcontext_SOURCES = Source/WebKit2/UIProcess/API/gtk/tests/testwebcontext.c
     1017Programs_unittests_webkit2_testwebcontext_CFLAGS = $(webkit2_tests_cflags)
     1018Programs_unittests_webkit2_testwebcontext_LDADD = $(webkit2_tests_ldadd)
     1019Programs_unittests_webkit2_testwebcontext_LDFLAGS = $(webkit2_tests_ldflags)
     1020
    9851021# WebKitWebProcess
    9861022libexec_PROGRAMS += \
  • trunk/Source/WebKit2/UIProcess/API/gtk/tests/testwebcontext.c

    r96130 r96133  
    33 *
    44 * This library is free software; you can redistribute it and/or
    5  * modify it under the terms of the GNU Library General Public
     5 * modify it under the terms of the GNU Lesser General Public
    66 * License as published by the Free Software Foundation; either
    7  * version 2 of the License, or (at your option) any later version.
     7 * version 2,1 of the License, or (at your option) any later version.
    88 *
    99 * This library is distributed in the hope that it will be useful,
     
    1818 */
    1919
    20 #ifndef __WEBKIT2_H__
    21 #define __WEBKIT2_H__
     20#include <glib.h>
     21#include <gtk/gtk.h>
     22#include <webkit2/webkit2.h>
    2223
    23 #include <webkit2/WebKitWebViewBase.h>
    24 #include <webkit2/WebKitWebView.h>
     24static void testWebContextDefault(void)
     25{
     26    /* Check there's a single instance of the default web context. */
     27    g_assert(webkit_web_context_get_default() == webkit_web_context_get_default());
     28}
    2529
    26 #endif /* __WEBKIT2_H__ */
     30int main(int argc, char **argv)
     31{
     32    g_thread_init(NULL);
     33    gtk_test_init(&argc, &argv, NULL);
     34
     35    g_test_bug_base("https://bugs.webkit.org/");
     36    g_test_add_func("/webkit2/webcontext/default_context",
     37                    testWebContextDefault);
     38
     39    return g_test_run();
     40}
     41
  • trunk/Source/WebKit2/UIProcess/API/gtk/webkit2.h

    r96121 r96133  
    2121#define __WEBKIT2_H__
    2222
     23#include <webkit2/WebKitWebContext.h>
    2324#include <webkit2/WebKitWebViewBase.h>
    2425#include <webkit2/WebKitWebView.h>
Note: See TracChangeset for help on using the changeset viewer.