Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[GTK] Add support for loading web process extensions
https://bugs.webkit.org/show_bug.cgi?id=105631 Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-01-10 Reviewed by Gustavo Noronha Silva. .: * GNUmakefile.am: Add webkit2_web_extension_h_api. * Source/autotools/symbols.filter: Export WebGtkExtensionManager symbols required by the injected bundle lib. Source/WebKit2: * GNUmakefile.am: Link to libWebCoreDOM.la and build injected bundle lib. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/gtk/WebKitWebContext.cpp: (injectedBundleDirectory): Helper funtion to get the injected bundle directory. (injectedBundleFilename): Helper funtion to get the injected undle library full path. (createDefaultWebContext): Create the WebContext with an injected bundle path. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_get_page_id): Return the identifier of the web page associated to the web view. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new chapter for web extensions. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add new types. * UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/tests/TestMain.cpp: (main): * UIProcess/API/gtk/tests/TestWebExtensions.cpp: Added. (testWebExtension): (beforeAll): (afterAll): * UIProcess/API/gtk/tests/WebExtensionTest.cpp: Added. (methodCallCallback): (webkit_web_extension_initialize): * UIProcess/API/gtk/tests/WebKitTestBus.cpp: Added. (WebKitTestBus::WebKitTestBus): (WebKitTestBus::run): (WebKitTestBus::~WebKitTestBus): (WebKitTestBus::connection): (onNameAppeared): (WebKitTestBus::createProxy): * UIProcess/API/gtk/tests/WebKitTestBus.h: Added. (WebKitTestBus): * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Added. (_WebKitWebExtensionPrivate): (webkitWebExtensionPageCreated): Create a WebKitWebPage for the newly crated page and emit WebKitWebExtension::page-created signals. (webkitWebExtensionPageDestroy): Remove the page from the map. (didCreatePage): Call webkitWebExtensionPageCreated(). (willDestroyPage): Call webkitWebExtensionPageDestroy(). (webkitWebExtensionCreate): Create a new WebKitWebExtension and initialize the injected bundle client. (webkit_web_extension_get_page): Return the WebKitWebPage for the given page identifier. * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h: Added. (_WebKitWebExtension): (_WebKitWebExtensionClass): * WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionDefines.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionPrivate.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Added. (_WebKitWebPagePrivate): (webkit_web_page_class_init): (webkitWebPageCreate): Create a new WebKitWebPage. (webkit_web_page_get_dom_document): Return the WebKitDOMDocument loaded in the WebKitWebPage. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: Added. (_WebKitWebPage): (_WebKitWebPageClass): * WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h: Added. * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Added. * WebProcess/gtk/WebGtkExtensionManager.cpp: Added. (WebKit::WebGtkExtensionManager::shared): Return the global shared instance. (WebKit::WebGtkExtensionManager::WebGtkExtensionManager): (WebKit::WebGtkExtensionManager::appendModuleDirectories): Add directories to scan for modules. (WebKit::WebGtkExtensionManager::scanModules): Scan for modules. (WebKit::WebGtkExtensionManager::initialize): Load and initialize the modules found. * WebProcess/gtk/WebGtkExtensionManager.h: Added. * WebProcess/gtk/WebGtkInjectedBundleMain.cpp: Added. (WKBundleInitialize): Initialize WebGtkExtensionManager. Tools: * MiniBrowser/gtk/GNUmakefile.am: * MiniBrowser/gtk/main.c: (main): Set WEBKIT_INJECTED_BUNDLE env var to use the injected bundle lib from build dir. * Scripts/webkitpy/style/checker.py: Add exceptions for GTK+ API located in WebProcess/InjectedBundle/API/gtk. * gtk/generate-gtkdoc: (get_webkit2_options): Scan also files in WebProcess/InjectedBundle/API/gtk to generate API docs. (get_webkit2_options.injected_bundle_src_path): Helper function to build paths in WebProcess/InjectedBundle/API/gtk. Canonical link: https://commits.webkit.org/124753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
1,255 additions
and 9 deletions.
- +11 −0 ChangeLog
- +1 −0 GNUmakefile.am
- +85 −0 Source/WebKit2/ChangeLog
- +42 −3 Source/WebKit2/GNUmakefile.am
- +18 −2 Source/WebKit2/GNUmakefile.list.am
- +16 −1 Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
- +16 −0 Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
- +3 −0 Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h
- +6 −0 Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml
- +40 −0 Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
- +2 −0 Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types
- +35 −0 Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
- +1 −0 Source/WebKit2/UIProcess/API/gtk/tests/TestMain.cpp
- +61 −0 Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp
- +93 −0 Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp
- +106 −0 Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.cpp
- +43 −0 Source/WebKit2/UIProcess/API/gtk/tests/WebKitTestBus.h
- +130 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp
- +72 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h
- +47 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionDefines.h
- +28 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionPrivate.h
- +66 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp
- +62 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h
- +28 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h
- +30 −0 Source/WebKit2/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
- +89 −0 Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp
- +57 −0 Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h
- +35 −0 Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp
- +2 −0 Source/autotools/symbols.filter
- +19 −0 Tools/ChangeLog
- +1 −0 Tools/MiniBrowser/gtk/GNUmakefile.am
- +1 −0 Tools/MiniBrowser/gtk/main.c
- +5 −2 Tools/Scripts/webkitpy/style/checker.py
- +4 −1 Tools/gtk/generate-gtkdoc
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.