Commit cae625ba authored by Jan-Michael Brummer's avatar Jan-Michael Brummer

Rename webextension to webprocessextension

In order to avoid future conflicts with official web browser web extension, rename our current webextensions to webprocessextension.
parent ea4fb468
Pipeline #81675 passed with stage
in 5 minutes and 41 seconds
This diff is collapsed.
......@@ -19,12 +19,12 @@
*/
#include <config.h>
#include "ephy-web-extension-proxy.h"
#include "ephy-web-process-extension-proxy.h"
#include "ephy-dbus-names.h"
#include "ephy-history-service.h"
struct _EphyWebExtensionProxy {
struct _EphyWebProcessExtensionProxy {
GObject parent_instance;
GCancellable *cancellable;
......@@ -43,45 +43,45 @@ enum {
static guint signals[LAST_SIGNAL];
G_DEFINE_TYPE (EphyWebExtensionProxy, ephy_web_extension_proxy, G_TYPE_OBJECT)
G_DEFINE_TYPE (EphyWebProcessExtensionProxy, ephy_web_process_extension_proxy, G_TYPE_OBJECT)
static void
ephy_web_extension_proxy_dispose (GObject *object)
ephy_web_process_extension_proxy_dispose (GObject *object)
{
EphyWebExtensionProxy *web_extension = EPHY_WEB_EXTENSION_PROXY (object);
EphyWebProcessExtensionProxy *web_process_extension = EPHY_WEB_PROCESS_EXTENSION_PROXY (object);
if (web_extension->page_created_signal_id > 0) {
g_dbus_connection_signal_unsubscribe (web_extension->connection,
web_extension->page_created_signal_id);
web_extension->page_created_signal_id = 0;
if (web_process_extension->page_created_signal_id > 0) {
g_dbus_connection_signal_unsubscribe (web_process_extension->connection,
web_process_extension->page_created_signal_id);
web_process_extension->page_created_signal_id = 0;
}
if (web_extension->cancellable) {
g_cancellable_cancel (web_extension->cancellable);
g_clear_object (&web_extension->cancellable);
if (web_process_extension->cancellable) {
g_cancellable_cancel (web_process_extension->cancellable);
g_clear_object (&web_process_extension->cancellable);
}
g_clear_object (&web_extension->proxy);
g_clear_object (&web_extension->connection);
g_clear_object (&web_process_extension->proxy);
g_clear_object (&web_process_extension->connection);
G_OBJECT_CLASS (ephy_web_extension_proxy_parent_class)->dispose (object);
G_OBJECT_CLASS (ephy_web_process_extension_proxy_parent_class)->dispose (object);
}
static void
ephy_web_extension_proxy_init (EphyWebExtensionProxy *web_extension)
ephy_web_process_extension_proxy_init (EphyWebProcessExtensionProxy *web_process_extension)
{
}
static void
ephy_web_extension_proxy_class_init (EphyWebExtensionProxyClass *klass)
ephy_web_process_extension_proxy_class_init (EphyWebProcessExtensionProxyClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = ephy_web_extension_proxy_dispose;
object_class->dispose = ephy_web_process_extension_proxy_dispose;
signals[PAGE_CREATED] =
g_signal_new ("page-created",
EPHY_TYPE_WEB_EXTENSION_PROXY,
EPHY_TYPE_WEB_PROCESS_EXTENSION_PROXY,
G_SIGNAL_RUN_FIRST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 1,
......@@ -89,112 +89,112 @@ ephy_web_extension_proxy_class_init (EphyWebExtensionProxyClass *klass)
signals[CONNECTION_CLOSED] =
g_signal_new ("connection-closed",
EPHY_TYPE_WEB_EXTENSION_PROXY,
EPHY_TYPE_WEB_PROCESS_EXTENSION_PROXY,
G_SIGNAL_RUN_FIRST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
static void
web_extension_page_created (GDBusConnection *connection,
const char *sender_name,
const char *object_path,
const char *interface_name,
const char *signal_name,
GVariant *parameters,
EphyWebExtensionProxy *web_extension)
web_process_extension_page_created (GDBusConnection *connection,
const char *sender_name,
const char *object_path,
const char *interface_name,
const char *signal_name,
GVariant *parameters,
EphyWebProcessExtensionProxy *web_process_extension)
{
guint64 page_id;
g_variant_get (parameters, "(t)", &page_id);
g_signal_emit (web_extension, signals[PAGE_CREATED], 0, page_id);
g_signal_emit (web_process_extension, signals[PAGE_CREATED], 0, page_id);
}
static void
web_extension_proxy_created_cb (GDBusProxy *proxy,
GAsyncResult *result,
EphyWebExtensionProxy *web_extension)
web_process_extension_proxy_created_cb (GDBusProxy *proxy,
GAsyncResult *result,
EphyWebProcessExtensionProxy *web_process_extension)
{
g_autoptr(GError) error = NULL;
web_extension->proxy = g_dbus_proxy_new_finish (result, &error);
if (!web_extension->proxy) {
web_process_extension->proxy = g_dbus_proxy_new_finish (result, &error);
if (!web_process_extension->proxy) {
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("Error creating web extension proxy: %s", error->message);
g_warning ("Error creating web process extension proxy: %s", error->message);
/* Attempt to trigger connection_closed_cb, which will emit the
* connection-closed signal, ensuring that EphyEmbedShell will
* remove us from its extensions list.
*/
g_dbus_connection_close (web_extension->connection,
web_extension->cancellable,
g_dbus_connection_close (web_process_extension->connection,
web_process_extension->cancellable,
NULL /* GAsyncReadyCallback */,
NULL);
g_object_unref (web_extension);
g_object_unref (web_process_extension);
return;
}
web_extension->page_created_signal_id =
g_dbus_connection_signal_subscribe (web_extension->connection,
web_process_extension->page_created_signal_id =
g_dbus_connection_signal_subscribe (web_process_extension->connection,
NULL,
EPHY_WEB_EXTENSION_INTERFACE,
EPHY_WEB_PROCESS_EXTENSION_INTERFACE,
"PageCreated",
EPHY_WEB_EXTENSION_OBJECT_PATH,
EPHY_WEB_PROCESS_EXTENSION_OBJECT_PATH,
NULL,
G_DBUS_SIGNAL_FLAGS_NONE,
(GDBusSignalCallback)web_extension_page_created,
web_extension,
(GDBusSignalCallback)web_process_extension_page_created,
web_process_extension,
NULL);
g_object_unref (web_extension);
g_object_unref (web_process_extension);
}
static void
connection_closed_cb (GDBusConnection *connection,
gboolean remote_peer_vanished,
GError *error,
EphyWebExtensionProxy *web_extension)
connection_closed_cb (GDBusConnection *connection,
gboolean remote_peer_vanished,
GError *error,
EphyWebProcessExtensionProxy *web_process_extension)
{
if (error && !remote_peer_vanished)
g_warning ("Unexpectedly lost connection to web extension: %s", error->message);
g_warning ("Unexpectedly lost connection to web process extension: %s", error->message);
g_signal_emit (web_extension, signals[CONNECTION_CLOSED], 0);
g_signal_emit (web_process_extension, signals[CONNECTION_CLOSED], 0);
}
EphyWebExtensionProxy *
ephy_web_extension_proxy_new (GDBusConnection *connection)
EphyWebProcessExtensionProxy *
ephy_web_process_extension_proxy_new (GDBusConnection *connection)
{
EphyWebExtensionProxy *web_extension;
EphyWebProcessExtensionProxy *web_process_extension;
g_assert (G_IS_DBUS_CONNECTION (connection));
web_extension = g_object_new (EPHY_TYPE_WEB_EXTENSION_PROXY, NULL);
web_process_extension = g_object_new (EPHY_TYPE_WEB_PROCESS_EXTENSION_PROXY, NULL);
g_signal_connect (connection, "closed",
G_CALLBACK (connection_closed_cb), web_extension);
G_CALLBACK (connection_closed_cb), web_process_extension);
web_extension->cancellable = g_cancellable_new ();
web_extension->connection = g_object_ref (connection);
web_process_extension->cancellable = g_cancellable_new ();
web_process_extension->connection = g_object_ref (connection);
g_dbus_proxy_new (connection,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
NULL,
NULL,
EPHY_WEB_EXTENSION_OBJECT_PATH,
EPHY_WEB_EXTENSION_INTERFACE,
web_extension->cancellable,
(GAsyncReadyCallback)web_extension_proxy_created_cb,
g_object_ref (web_extension));
EPHY_WEB_PROCESS_EXTENSION_OBJECT_PATH,
EPHY_WEB_PROCESS_EXTENSION_INTERFACE,
web_process_extension->cancellable,
(GAsyncReadyCallback)web_process_extension_proxy_created_cb,
g_object_ref (web_process_extension));
return web_extension;
return web_process_extension;
}
void
ephy_web_extension_proxy_history_set_urls (EphyWebExtensionProxy *web_extension,
GList *urls)
ephy_web_process_extension_proxy_history_set_urls (EphyWebProcessExtensionProxy *web_process_extension,
GList *urls)
{
GList *l;
GVariantBuilder builder;
if (!web_extension->proxy)
if (!web_process_extension->proxy)
return;
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ss)"));
......@@ -204,103 +204,103 @@ ephy_web_extension_proxy_history_set_urls (EphyWebExtensionProxy *web_extension,
g_variant_builder_add (&builder, "(ss)", url->url, url->title);
}
g_dbus_proxy_call (web_extension->proxy,
g_dbus_proxy_call (web_process_extension->proxy,
"HistorySetURLs",
g_variant_new ("(@a(ss))", g_variant_builder_end (&builder)),
G_DBUS_CALL_FLAGS_NONE,
-1,
web_extension->cancellable,
web_process_extension->cancellable,
NULL, NULL);
}
void
ephy_web_extension_proxy_history_set_url_thumbnail (EphyWebExtensionProxy *web_extension,
const char *url,
const char *path)
ephy_web_process_extension_proxy_history_set_url_thumbnail (EphyWebProcessExtensionProxy *web_process_extension,
const char *url,
const char *path)
{
if (!web_extension->proxy)
if (!web_process_extension->proxy)
return;
g_dbus_proxy_call (web_extension->proxy,
g_dbus_proxy_call (web_process_extension->proxy,
"HistorySetURLThumbnail",
g_variant_new ("(ss)", url, path),
G_DBUS_CALL_FLAGS_NONE,
-1,
web_extension->cancellable,
web_process_extension->cancellable,
NULL, NULL);
}
void
ephy_web_extension_proxy_history_set_url_title (EphyWebExtensionProxy *web_extension,
const char *url,
const char *title)
ephy_web_process_extension_proxy_history_set_url_title (EphyWebProcessExtensionProxy *web_process_extension,
const char *url,
const char *title)
{
if (!web_extension->proxy)
if (!web_process_extension->proxy)
return;
g_dbus_proxy_call (web_extension->proxy,
g_dbus_proxy_call (web_process_extension->proxy,
"HistorySetURLTitle",
g_variant_new ("(ss)", url, title),
G_DBUS_CALL_FLAGS_NONE,
-1,
web_extension->cancellable,
web_process_extension->cancellable,
NULL, NULL);
}
void
ephy_web_extension_proxy_history_delete_url (EphyWebExtensionProxy *web_extension,
const char *url)
ephy_web_process_extension_proxy_history_delete_url (EphyWebProcessExtensionProxy *web_process_extension,
const char *url)
{
if (!web_extension->proxy)
if (!web_process_extension->proxy)
return;
g_dbus_proxy_call (web_extension->proxy,
g_dbus_proxy_call (web_process_extension->proxy,
"HistoryDeleteURL",
g_variant_new ("(s)", url),
G_DBUS_CALL_FLAGS_NONE,
-1,
web_extension->cancellable,
web_process_extension->cancellable,
NULL, NULL);
}
void
ephy_web_extension_proxy_history_delete_host (EphyWebExtensionProxy *web_extension,
const char *host)
ephy_web_process_extension_proxy_history_delete_host (EphyWebProcessExtensionProxy *web_process_extension,
const char *host)
{
if (!web_extension->proxy)
if (!web_process_extension->proxy)
return;
g_dbus_proxy_call (web_extension->proxy,
g_dbus_proxy_call (web_process_extension->proxy,
"HistoryDeleteHost",
g_variant_new ("(s)", host),
G_DBUS_CALL_FLAGS_NONE,
-1,
web_extension->cancellable,
web_process_extension->cancellable,
NULL, NULL);
}
void
ephy_web_extension_proxy_history_clear (EphyWebExtensionProxy *web_extension)
ephy_web_process_extension_proxy_history_clear (EphyWebProcessExtensionProxy *web_process_extension)
{
if (!web_extension->proxy)
if (!web_process_extension->proxy)
return;
g_dbus_proxy_call (web_extension->proxy,
g_dbus_proxy_call (web_process_extension->proxy,
"HistoryClear",
NULL,
G_DBUS_CALL_FLAGS_NONE,
-1,
web_extension->cancellable,
web_process_extension->cancellable,
NULL, NULL);
}
void
ephy_web_extension_proxy_password_query_usernames_response (EphyWebExtensionProxy *web_extension,
GList *users,
gint32 promise_id,
guint64 page_id)
ephy_web_process_extension_proxy_password_query_usernames_response (EphyWebProcessExtensionProxy *web_process_extension,
GList *users,
gint32 promise_id,
guint64 page_id)
{
if (!web_extension->proxy)
if (!web_process_extension->proxy)
return;
GList *l;
......@@ -308,30 +308,30 @@ ephy_web_extension_proxy_password_query_usernames_response (EphyWebExtensionProx
for (l = users; l != NULL; l = l->next)
g_variant_builder_add (&builder, "s", l->data);
g_dbus_proxy_call (web_extension->proxy,
g_dbus_proxy_call (web_process_extension->proxy,
"PasswordQueryUsernamesResponse",
g_variant_new ("(asit)", &builder, promise_id, page_id),
G_DBUS_CALL_FLAGS_NONE,
-1,
web_extension->cancellable,
web_process_extension->cancellable,
NULL, NULL);
}
void
ephy_web_extension_proxy_password_query_response (EphyWebExtensionProxy *web_extension,
const char *username,
const char *password,
gint32 promise_id,
guint64 page_id)
ephy_web_process_extension_proxy_password_query_response (EphyWebProcessExtensionProxy *web_process_extension,
const char *username,
const char *password,
gint32 promise_id,
guint64 page_id)
{
if (!web_extension->proxy)
if (!web_process_extension->proxy)
return;
g_dbus_proxy_call (web_extension->proxy,
g_dbus_proxy_call (web_process_extension->proxy,
"PasswordQueryResponse",
g_variant_new ("(ssit)", username ?: "", password ?: "", promise_id, page_id),
G_DBUS_CALL_FLAGS_NONE,
-1,
web_extension->cancellable,
web_process_extension->cancellable,
NULL, NULL);
}
......@@ -24,31 +24,31 @@
G_BEGIN_DECLS
#define EPHY_TYPE_WEB_EXTENSION_PROXY (ephy_web_extension_proxy_get_type ())
#define EPHY_TYPE_WEB_PROCESS_EXTENSION_PROXY (ephy_web_process_extension_proxy_get_type ())
G_DECLARE_FINAL_TYPE (EphyWebExtensionProxy, ephy_web_extension_proxy, EPHY, WEB_EXTENSION_PROXY, GObject)
G_DECLARE_FINAL_TYPE (EphyWebProcessExtensionProxy, ephy_web_process_extension_proxy, EPHY, WEB_PROCESS_EXTENSION_PROXY, GObject)
EphyWebExtensionProxy *ephy_web_extension_proxy_new (GDBusConnection *connection);
void ephy_web_extension_proxy_history_set_urls (EphyWebExtensionProxy *web_extension,
GList *urls);
void ephy_web_extension_proxy_history_set_url_thumbnail (EphyWebExtensionProxy *web_extension,
const char *url,
const char *path);
void ephy_web_extension_proxy_history_set_url_title (EphyWebExtensionProxy *web_extension,
const char *url,
const char *title);
void ephy_web_extension_proxy_history_delete_url (EphyWebExtensionProxy *web_extension,
const char *url);
void ephy_web_extension_proxy_history_delete_host (EphyWebExtensionProxy *web_extension,
const char *host);
void ephy_web_extension_proxy_history_clear (EphyWebExtensionProxy *web_extension);
void ephy_web_extension_proxy_password_query_usernames_response (EphyWebExtensionProxy *web_extension,
GList *users,
gint32 promise_id,
guint64 page_id);
void ephy_web_extension_proxy_password_query_response (EphyWebExtensionProxy *web_extension,
const char *username,
const char *password,
gint32 promise_id,
guint64 page_id);
EphyWebProcessExtensionProxy *ephy_web_process_extension_proxy_new (GDBusConnection *connection);
void ephy_web_process_extension_proxy_history_set_urls (EphyWebProcessExtensionProxy *web_process_extension,
GList *urls);
void ephy_web_process_extension_proxy_history_set_url_thumbnail (EphyWebProcessExtensionProxy *web_process_extension,
const char *url,
const char *path);
void ephy_web_process_extension_proxy_history_set_url_title (EphyWebProcessExtensionProxy *web_process_extension,
const char *url,
const char *title);
void ephy_web_process_extension_proxy_history_delete_url (EphyWebProcessExtensionProxy *web_process_extension,
const char *url);
void ephy_web_process_extension_proxy_history_delete_host (EphyWebProcessExtensionProxy *web_process_extension,
const char *host);
void ephy_web_process_extension_proxy_history_clear (EphyWebProcessExtensionProxy *web_process_extension);
void ephy_web_process_extension_proxy_password_query_usernames_response (EphyWebProcessExtensionProxy *web_process_extension,
GList *users,
gint32 promise_id,
guint64 page_id);
void ephy_web_process_extension_proxy_password_query_response (EphyWebProcessExtensionProxy *web_process_extension,
const char *username,
const char *password,
gint32 promise_id,
guint64 page_id);
G_END_DECLS
......@@ -134,8 +134,8 @@ struct _EphyWebView {
EphyWebViewErrorPage error_page;
/* Web Extension */
EphyWebExtensionProxy *web_extension;
/* Web Process Extension */
EphyWebProcessExtensionProxy *web_process_extension;
};
typedef struct {
......@@ -907,16 +907,16 @@ allow_unsafe_browsing_cb (EphyEmbedShell *shell,
}
static void
page_created_cb (EphyEmbedShell *shell,
guint64 page_id,
EphyWebExtensionProxy *web_extension,
EphyWebView *view)
page_created_cb (EphyEmbedShell *shell,
guint64 page_id,
EphyWebProcessExtensionProxy *web_process_extension,
EphyWebView *view)
{
if (webkit_web_view_get_page_id (WEBKIT_WEB_VIEW (view)) != page_id)
return;
view->web_extension = web_extension;
g_object_add_weak_pointer (G_OBJECT (view->web_extension), (gpointer *)&view->web_extension);
view->web_process_extension = web_process_extension;
g_object_add_weak_pointer (G_OBJECT (view->web_process_extension), (gpointer *)&view->web_process_extension);
g_signal_connect_object (shell, "password-form-focused",
G_CALLBACK (password_form_focused_cb),
......@@ -936,9 +936,9 @@ ephy_web_view_dispose (GObject *object)
{
EphyWebView *view = EPHY_WEB_VIEW (object);
if (view->web_extension) {
g_object_remove_weak_pointer (G_OBJECT (view->web_extension), (gpointer *)&view->web_extension);
view->web_extension = NULL;
if (view->web_process_extension) {
g_object_remove_weak_pointer (G_OBJECT (view->web_process_extension), (gpointer *)&view->web_process_extension);
view->web_process_extension = NULL;
}
untrack_info_bar (&view->geolocation_info_bar);
......@@ -3949,10 +3949,10 @@ ephy_web_view_get_reader_mode_state (EphyWebView *view)
return view->reader_active;
}
EphyWebExtensionProxy *
ephy_web_view_get_web_extension_proxy (EphyWebView *view)
EphyWebProcessExtensionProxy *
ephy_web_view_get_web_process_extension_proxy (EphyWebView *view)
{
return view->web_extension;
return view->web_process_extension;
}
gboolean
......
......@@ -26,7 +26,7 @@
#include "ephy-embed-shell.h"
#include "ephy-history-types.h"
#include "ephy-security-levels.h"
#include "ephy-web-extension-proxy.h"
#include "ephy-web-process-extension-proxy.h"
G_BEGIN_DECLS
......@@ -165,7 +165,7 @@ gboolean ephy_web_view_get_reader_mode_state (EphyWebView
gboolean ephy_web_view_is_in_auth_dialog (EphyWebView *view);
EphyWebExtensionProxy *ephy_web_view_get_web_extension_proxy (EphyWebView *view);
EphyWebProcessExtensionProxy *ephy_web_view_get_web_process_extension_proxy (EphyWebView *view);
void ephy_web_view_show_auth_form_save_request (EphyWebView *web_view,
const char *origin,
......
subdir('web-extension')
subdir('web-process-extension')
types_headers = [
'ephy-download.h',
......@@ -28,7 +28,7 @@ libephyembed_sources = [
'ephy-find-toolbar.c',
'ephy-view-source-handler.c',
'ephy-web-view.c',
'ephy-web-extension-proxy.c',
'ephy-web-process-extension-proxy.c',
enums
]
......
......@@ -599,7 +599,7 @@ ephy_uri_tester_begin_loading_adblock_filters (EphyUriTester *tester,
{
g_auto(GStrv) filters;
filters = g_settings_get_strv (EPHY_SETTINGS_WEB_EXTENSION_MAIN, EPHY_PREFS_ADBLOCK_FILTERS);
filters = g_settings_get_strv (EPHY_SETTINGS_WEB_PROCESS_EXTENSION_MAIN, EPHY_PREFS_ADBLOCK_FILTERS);
tester->adblock_filters_to_load = g_strv_length (filters);
for (guint i = 0; filters[i]; i++) {
g_autoptr(GFile) filter_file = NULL;
......@@ -814,7 +814,7 @@ ephy_uri_tester_load (EphyUriTester *tester)
g_assert (EPHY_IS_URI_TESTER (tester));
if (!g_settings_get_boolean (EPHY_SETTINGS_WEB_EXTENSION_WEB, EPHY_PREFS_WEB_ENABLE_ADBLOCK))
if (!g_settings_get_boolean (EPHY_SETTINGS_WEB_PROCESS_EXTENSION_WEB, EPHY_PREFS_WEB_ENABLE_ADBLOCK))
tester->adblock_loaded = TRUE;
if (tester->adblock_loaded)
......@@ -832,6 +832,6 @@ ephy_uri_tester_load (EphyUriTester *tester)
G_CALLBACK (ephy_uri_tester_enable_adblock_changed_cb), tester);
/* GSettings never emits the changed signal until after we read the setting
* the first time after connecting the handler... work around this.*/
trash = g_settings_get_strv (EPHY_SETTINGS_WEB_EXTENSION_MAIN, EPHY_PREFS_ADBLOCK_FILTERS);
trash = g_settings_get_strv (EPHY_SETTINGS_WEB_PROCESS_EXTENSION_MAIN, EPHY_PREFS_ADBLOCK_FILTERS);
g_strfreev (trash);
}
......@@ -20,7 +20,7 @@
#include "config.h"
#include "ephy-web-extension.h"
#include "ephy-web-process-extension.h"
#include "ephy-debug.h"
#include "ephy-file-helpers.h"
#include "ephy-settings.h"
......@@ -28,7 +28,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
static EphyWebExtension *extension = NULL;
static EphyWebProcessExtension *extension = NULL;
G_MODULE_EXPORT void
webkit_web_extension_initialize_with_user_data (WebKitWebExtension *webkit_extension,
......@@ -54,19 +54,19 @@ webkit_web_extension_initialize_with_user_data (WebKitWebExtension *webkit_exten
ephy_debug_init ();
extension = ephy_web_extension_get ();
extension = ephy_web_process_extension_get ();
ephy_web_extension_initialize (extension,
webkit_extension,
guid,
server_address,
adblock_data_dir,
private_profile,
browser_mode);
ephy_web_process_extension_initialize (extension,
webkit_extension,
guid,
server_address,
adblock_data_dir,
private_profile,
browser_mode);
}
static void __attribute__((destructor))
ephy_web_extension_shutdown (void)
ephy_web_process_extension_shutdown (void)
{
if (extension)
g_object_unref (extension);
......
......@@ -19,7 +19,7 @@
*/
#include "config.h"
#include "ephy-web-extension.h"
#include "ephy-web-process-extension.h"
#include "ephy-dbus-names.h"
#include "ephy-dbus-util.h"
......@@ -42,7 +42,7 @@
#include <webkit2/webkit-web-extension.h>
#include <JavaScriptCore/JavaScript.h>
struct _EphyWebExtension {
struct _EphyWebProcessExtension {
GObject parent_instance;
WebKitWebExtension *extension;
......@@ -62,7 +62,7 @@ struct _EphyWebExtension {
static const char introspection_xml[] =
"<node>"
" <interface name='org.gnome.Epiphany.WebExtension'>"
" <interface name='org.gnome.Epiphany.WebProcessExtension'>"
" <signal name='PageCreated'>"
" <arg type='t' name='page_id' direction='out'/>"
" </signal>"
......@@ -98,12 +98,12 @@ static const char introspection_xml[] =
" </interface>"
"</node>";
G_DEFINE_TYPE (EphyWebExtension, ephy_web_extension, G_TYPE_OBJECT)
G_DEFINE_TYPE (EphyWebProcessExtension, ephy_web_process_extension, G_TYPE_OBJECT)
static void
log_to_js_console (EphyWebExtension *extension,
WebKitWebPage *page,
const char *str,
log_to_js_console (EphyWebProcessExtension *extension,
WebKitWebPage *page,
const char *str,
...)
{
g_autoptr(JSCContext) js_context = NULL;
......@@ -129,10 +129,10 @@ log_to_js_console (EphyWebExtension *extension,
}
static gboolean
should_use_adblocker (const char *request_uri,
const char *page_uri,
const char *redirected_request_uri,
EphyWebExtension *extension)
should_use_adblocker (const char *request_uri,
const char *page_uri,
const char *redirected_request_uri,
EphyWebProcessExtension *extension)
{
g_autofree gchar *origin = ephy_uri_to_security_origin (page_uri);
EphyPermission permission = EPHY_PERMISSION_UNDECIDED;
......@@ -146,7 +146,7 @@ should_use_adblocker (const char *request_uri,
return FALSE;
}