From bc6368375ebf8484aba8380cb2b5c5837107d6f3 Mon Sep 17 00:00:00 2001 From: younghajung <35090305+younghajung@users.noreply.github.com> Date: Tue, 19 Nov 2019 16:06:27 +0900 Subject: [PATCH] [WebView] Add Chromium.SetArguments (#1128) This patch adds Chromium.SetArguments that can be used to set Chromium's commandline switches. Signed-off-by: yh106.jung --- src/Tizen.WebView/Interop/Interop.ChromiumEwk.cs | 3 +++ src/Tizen.WebView/Tizen.WebView/Chromium.cs | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/Tizen.WebView/Interop/Interop.ChromiumEwk.cs b/src/Tizen.WebView/Interop/Interop.ChromiumEwk.cs index cd9ca31..5066c37 100644 --- a/src/Tizen.WebView/Interop/Interop.ChromiumEwk.cs +++ b/src/Tizen.WebView/Interop/Interop.ChromiumEwk.cs @@ -25,5 +25,8 @@ internal static partial class Interop [DllImport(Libraries.ChromiumEwk)] internal static extern int ewk_shutdown(); + + [DllImport(Libraries.ChromiumEwk)] + internal static extern int ewk_set_arguments(int argc, string[] argv); } } diff --git a/src/Tizen.WebView/Tizen.WebView/Chromium.cs b/src/Tizen.WebView/Tizen.WebView/Chromium.cs index e457e53..4c980e9 100644 --- a/src/Tizen.WebView/Tizen.WebView/Chromium.cs +++ b/src/Tizen.WebView/Tizen.WebView/Chromium.cs @@ -14,6 +14,9 @@ * limitations under the License. */ +using System; +using System.ComponentModel; + namespace Tizen.WebView { /// @@ -41,5 +44,16 @@ namespace Tizen.WebView { return Interop.ChromiumEwk.ewk_shutdown(); } + + /// + /// Sets argument count and argument array for Chromium. + /// + /// Argument array. The first value of array must be program's name. + /// 6 + [EditorBrowsable(EditorBrowsableState.Never)] + public static void SetArguments(string[] args) + { + Interop.ChromiumEwk.ewk_set_arguments(args.Length, args); + } } } -- 2.7.4