Permalink
Browse files

cef: Remember initial browser_id

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
  • Loading branch information...
fenryxo committed Dec 22, 2017
1 parent c0a3dea commit 1ca1580c8caf84e9ab30bd1da27ed9f6aaf62bae
Showing with 5 additions and 2 deletions.
  1. +4 −1 src/nuvolakit-cef-worker/CefRendererExtension.vala
  2. +1 −1 src/nuvolakit-cef-worker/CefWorker.vala
@@ -2,15 +2,18 @@ namespace Nuvola {
public class CefRendererExtension : GLib.Object {
private CefGtk.RendererContext ctx;
private int browser_id;
private Drt.RpcChannel channel;
private File data_dir;
private File user_config_dir;
private string? api_token = null;
private HashTable<string, Variant>? worker_data;
private Drt.XdgStorage storage;
public CefRendererExtension(CefGtk.RendererContext ctx, Drt.RpcChannel channel, HashTable<string, Variant> worker_data) {
public CefRendererExtension(CefGtk.RendererContext ctx, int browser_id, Drt.RpcChannel channel,
HashTable<string, Variant> worker_data) {
this.ctx = ctx;
this.browser_id = browser_id;
this.channel = channel;
this.worker_data = worker_data;
this.storage = new Drt.XdgStorage.for_project(Nuvola.get_app_id());
@@ -9,7 +9,7 @@ public void init_renderer_extension(CefGtk.RendererContext ctx, int browser_id,
try {
var channel = new Drt.RpcChannel.from_name(0, data["RUNNER_BUS_NAME"].dup_string(), null,
data["NUVOLA_API_ROUTER_TOKEN"].dup_string(), 5000);
nuvola_cef_renderer_extension = new Nuvola.CefRendererExtension(ctx, channel, data);
nuvola_cef_renderer_extension = new Nuvola.CefRendererExtension(ctx, browser_id, channel, data);
} catch (GLib.Error e) {
error("Failed to connect to app runner. %s", e.message);
}

0 comments on commit 1ca1580

Please sign in to comment.