Skip to content

Commit

Permalink
cef: Integrate load_started signal
Browse files Browse the repository at this point in the history
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
  • Loading branch information
jiri-janousek committed Dec 21, 2017
1 parent 409ec68 commit c0a3dea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/nuvolakit-runner/cef/CefEngine.vala
Expand Up @@ -75,6 +75,7 @@ public class CefEngine : WebEngine {
web_view = new CefGtk.WebView(web_context);
config.set_default_value(ZOOM_LEVEL_CONF, 0.0);
web_view.zoom_level = config.get_double(ZOOM_LEVEL_CONF);
web_view.load_started.connect(on_load_started);
}

~CefEngine() {
Expand Down Expand Up @@ -310,6 +311,13 @@ public class CefEngine : WebEngine {
request.respond(null);
}

private void on_load_started(Cef.TransitionType transition) {
if (web_worker != null) {
debug("Load started");
web_worker.ready = false;
}
}

private void on_web_view_notify(GLib.Object? o, ParamSpec param) {
update_from_web_view(param.name);
}
Expand Down

0 comments on commit c0a3dea

Please sign in to comment.