diff options
author | Gustavo Noronha Silva <gns@gnome.org> | 2013-02-10 02:43:02 +0800 |
---|---|---|
committer | Gustavo Noronha Silva <gns@gnome.org> | 2013-02-12 23:55:51 +0800 |
commit | ce7ab1e34804d9f7529bed13267f4619c37e32d9 (patch) | |
tree | 69f2a2e2dbce017980352b1afd57e1b38c8f278b /embed/ephy-embed-shell.c | |
parent | 551eb0cec6469ece8e826411d65bf806ec043142 (diff) | |
download | gsoc2013-epiphany-ce7ab1e34804d9f7529bed13267f4619c37e32d9.tar gsoc2013-epiphany-ce7ab1e34804d9f7529bed13267f4619c37e32d9.tar.gz gsoc2013-epiphany-ce7ab1e34804d9f7529bed13267f4619c37e32d9.tar.bz2 gsoc2013-epiphany-ce7ab1e34804d9f7529bed13267f4619c37e32d9.tar.lz gsoc2013-epiphany-ce7ab1e34804d9f7529bed13267f4619c37e32d9.tar.xz gsoc2013-epiphany-ce7ab1e34804d9f7529bed13267f4619c37e32d9.tar.zst gsoc2013-epiphany-ce7ab1e34804d9f7529bed13267f4619c37e32d9.zip |
Only load pages when their tab is switched to upon session restore
Firefox has led the way implementing this behaviour to improve the experience
of restoring a session with lots of tabs. By delaying the loading of pages to
when the user shows interest in them, the time it takes for the browser to
become usable is diminished, and less pages are loaded in parallel, which
improves load time for the first pages the user sees.
It also has the advante of displaying less HTTP Basic Auth dialogs, when the
user has many tabs pointed to the same server.
https://bugzilla.gnome.org/show_bug.cgi?id=675302
Diffstat (limited to 'embed/ephy-embed-shell.c')
-rw-r--r-- | embed/ephy-embed-shell.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c index ea45a1433..b4366b2f4 100644 --- a/embed/ephy-embed-shell.c +++ b/embed/ephy-embed-shell.c @@ -62,6 +62,7 @@ enum DOWNLOAD_ADDED, DOWNLOAD_REMOVED, PREPARE_CLOSE, + RESTORED_WINDOW, LAST_SIGNAL }; @@ -263,6 +264,12 @@ ephy_embed_shell_prepare_close (EphyEmbedShell *shell) g_signal_emit (shell, signals[PREPARE_CLOSE], 0); } +void +ephy_embed_shell_restored_window (EphyEmbedShell *shell) +{ + g_signal_emit (shell, signals[RESTORED_WINDOW], 0); +} + static void ephy_embed_shell_set_property (GObject *object, guint prop_id, @@ -385,6 +392,23 @@ ephy_embed_shell_class_init (EphyEmbedShellClass *klass) g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +/** + * EphyEmbedShell::finished-restoring-window: + * @shell: the #EphyEmbedShell + * + * The ::finished-restoring-window signal is emitted when the + * session finishes restoring a window. + **/ + signals[RESTORED_WINDOW] = + g_signal_new ("window-restored", + EPHY_TYPE_EMBED_SHELL, + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EphyEmbedShellClass, restored_window), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + g_type_class_add_private (object_class, sizeof (EphyEmbedShellPrivate)); } |