Skip to content

Commit 3230444

Browse files
committed
WPF Example - Add Chrome internal Urls menu
- Add new menu for testing/debugging purposes
1 parent c56098d commit 3230444

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CefSharp.Example/CefExample.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public static class CefExample
3838
public const string RenderProcessCrashedUrl = "http://processcrashed";
3939
public const string TestUnicodeResourceUrl = "http://test/resource/loadUnicode";
4040
public const string PopupParentUrl = "http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_close";
41+
public const string ChromeInternalUrls = "chrome://chrome-urls";
42+
public const string ChromeNetInternalUrls = "chrome://net-internals";
43+
public const string ChromeProcessInternalUrls = "chrome://process-internals";
4144

4245
// Use when debugging the actual SubProcess, to make breakpoints etc. inside that project work.
4346
private static readonly bool DebuggingSubProcess = Debugger.IsAttached;

CefSharp.Wpf.Example/MainWindow.xaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
<MenuItem Header="_Google Service Worker Demo" Command="controls:CefSharpCommands.OpenTabCommand" CommandParameter="https://googlechrome.github.io/samples/service-worker/basic/"/>
5151
<MenuItem Header="Load Example Extension" Command="controls:CefSharpCommands.CustomCommand" CommandParameter="LoadExtension"/>
5252
</MenuItem>
53+
<MenuItem Header="_Chrome Urls">
54+
<MenuItem Header="_List Internal Urls" Command="controls:CefSharpCommands.OpenTabCommand" CommandParameter="{Binding Source={x:Static ex:CefExample.ChromeInternalUrls}}"/>
55+
<MenuItem Header="_Net Internal Urls" Command="controls:CefSharpCommands.OpenTabCommand" CommandParameter="{Binding Source={x:Static ex:CefExample.ChromeNetInternalUrls}}"/>
56+
<MenuItem Header="_Process Internal Urls" Command="controls:CefSharpCommands.OpenTabCommand" CommandParameter="{Binding Source={x:Static ex:CefExample.ChromeProcessInternalUrls}}"/>
57+
</MenuItem>
5358
</Menu>
5459
<controls:NonReloadingTabControl x:Name="TabControl"
5560
Margin="0,5,0,0"

0 commit comments

Comments
 (0)