[epiphany/pgriffis/web-extension/browserinfo] WebExtensions: Add more data to runtime.getBrowserInfo()




commit 1ea01f14bd312f77e50e1e7164b0441ab3093f15
Author: Patrick Griffis <pgriffis igalia com>
Date:   Wed Jun 8 13:17:20 2022 -0500

    WebExtensions: Add more data to runtime.getBrowserInfo()
    
    Its useful to have the version numbers.

 meson.build                    | 1 +
 src/webextension/api/runtime.c | 6 ++++++
 2 files changed, 7 insertions(+)
---
diff --git a/meson.build b/meson.build
index 05b0ebfc5..4d93ab82b 100644
--- a/meson.build
+++ b/meson.build
@@ -66,6 +66,7 @@ else
 endif
 conf.set('EPHY_MICRO_VERSION', 0)
 
+conf.set_quoted('EPHY_VERSION', meson.project_version())
 conf.set_quoted('VERSION', '@VCS_TAG@')
 
 gsb_api_key = get_option('gsb_api_key')
diff --git a/src/webextension/api/runtime.c b/src/webextension/api/runtime.c
index 0419a7097..cdc1568fd 100644
--- a/src/webextension/api/runtime.c
+++ b/src/webextension/api/runtime.c
@@ -40,6 +40,12 @@ runtime_handler_get_browser_info (EphyWebExtension  *self,
   json_builder_begin_object (builder);
   json_builder_set_member_name (builder, "name");
   json_builder_add_string_value (builder, "GNOME Web (Epiphany)");
+  json_builder_set_member_name (builder, "version");
+  json_builder_add_string_value (builder, EPHY_VERSION);
+  json_builder_set_member_name (builder, "vendor");
+  json_builder_add_string_value (builder, "GNOME");
+  json_builder_set_member_name (builder, "buildID");
+  json_builder_add_string_value (builder, VERSION);
   json_builder_end_object (builder);
 
   root = json_builder_get_root (builder);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]