From bea4307f879780393f4ba09c28482fa444df988d Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Mon, 6 Jun 2022 11:08:52 +1000 Subject: [PATCH] Core - Add IWindowInfo.WindowName Allows setting of the window_name property --- .../CefSharp.Core.Runtime.netcore.cs | 1 + CefSharp.Core.Runtime/WindowInfo.h | 12 ++++++++++++ CefSharp.Core/WindowInfo.cs | 7 +++++++ CefSharp/IWindowInfo.cs | 4 ++++ 4 files changed, 24 insertions(+) diff --git a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.netcore.cs b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.netcore.cs index fcd664c548..8e9d8129ec 100644 --- a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.netcore.cs +++ b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.netcore.cs @@ -329,6 +329,7 @@ public WindowInfo() { } public virtual int Width { get { throw null; } set { } } public virtual System.IntPtr WindowHandle { get { throw null; } set { } } public virtual bool WindowlessRenderingEnabled { get { throw null; } set { } } + public virtual string WindowName { get { throw null; } set { } } public virtual int X { get { throw null; } set { } } public virtual int Y { get { throw null; } set { } } public void Dispose() { } diff --git a/CefSharp.Core.Runtime/WindowInfo.h b/CefSharp.Core.Runtime/WindowInfo.h index 2ada03ed44..68e3c0637c 100644 --- a/CefSharp.Core.Runtime/WindowInfo.h +++ b/CefSharp.Core.Runtime/WindowInfo.h @@ -147,6 +147,18 @@ namespace CefSharp } } + virtual property String^ WindowName + { + String^ get() + { + return StringUtils::ToClr(_windowInfo->window_name); + } + void set(String^ value) + { + StringUtils::AssignNativeFromClr(_windowInfo->window_name, value); + } + } + virtual property bool WindowlessRenderingEnabled { bool get() diff --git a/CefSharp.Core/WindowInfo.cs b/CefSharp.Core/WindowInfo.cs index c9aebf4869..fb2a32b774 100644 --- a/CefSharp.Core/WindowInfo.cs +++ b/CefSharp.Core/WindowInfo.cs @@ -91,6 +91,13 @@ public IntPtr WindowHandle set { windowInfo.WindowHandle = value; } } + /// + public string WindowName + { + get { return windowInfo.WindowName; } + set { windowInfo.WindowName = value; } + } + /// public void Dispose() { diff --git a/CefSharp/IWindowInfo.cs b/CefSharp/IWindowInfo.cs index cfe9e052a4..1e70779065 100644 --- a/CefSharp/IWindowInfo.cs +++ b/CefSharp/IWindowInfo.cs @@ -65,6 +65,10 @@ public interface IWindowInfo : IDisposable /// Handle for the new browser window. Only used with windowed rendering. /// IntPtr WindowHandle { get; set; } + /// + /// Window Name + /// + string WindowName { get; set; } /// /// Create the browser as a child window.