diff --git a/CefSharp.Example/ExamplePresenter.cs b/CefSharp.Example/ExamplePresenter.cs
index bfd2f08b7..34266e998 100644
--- a/CefSharp.Example/ExamplePresenter.cs
+++ b/CefSharp.Example/ExamplePresenter.cs
@@ -21,6 +21,7 @@ namespace CefSharp.Example
private const string scheme_url = "test://test/SchemeTest.html";
private const string bind_url = "test://test/BindingTest.html";
private const string tooltip_url = "test://test/TooltipTest.html";
+ private const string popup_url = "test:/test/PopupTest.html";
private int color_index = 0;
private readonly string[] colors =
@@ -56,6 +57,7 @@ namespace CefSharp.Example
this.view.TestBindActivated += view_TestBindActivated;
this.view.TestConsoleMessageActivated += view_TestConsoleMessageActivated;
this.view.TestTooltipActivated += view_TestTooltipActivated;
+ this.view.TestPopupActivated += view_TestPopupActivated;
this.view.ExitActivated += view_ExitActivated;
}
@@ -70,10 +72,6 @@ namespace CefSharp.Example
@string = model.Title;
gui_invoke(() => view.SetTitle(@string));
break;
- case "TooltipText":
- @string = model.TooltipText;
- gui_invoke(() => view.SetTooltip(@string));
- break;
case "Address":
@string = model.Address;
gui_invoke(() => view.SetAddress(@string));
@@ -164,6 +162,11 @@ namespace CefSharp.Example
model.Load(tooltip_url);
}
+ private void view_TestPopupActivated(object sender, EventArgs e)
+ {
+ model.Load(popup_url);
+ }
+
private void view_ExitActivated(object sender, EventArgs e)
{
CEF.Shutdown();
diff --git a/CefSharp.Example/IExampleView.cs b/CefSharp.Example/IExampleView.cs
index baf5e1fce..97e5216c4 100644
--- a/CefSharp.Example/IExampleView.cs
+++ b/CefSharp.Example/IExampleView.cs
@@ -14,10 +14,10 @@ namespace CefSharp.Example
event EventHandler TestBindActivated;
event EventHandler TestConsoleMessageActivated;
event EventHandler TestTooltipActivated;
+ event EventHandler TestPopupActivated;
event EventHandler ExitActivated;
void SetTitle(string title);
- void SetTooltip(string tooltip);
void SetAddress(string address);
void SetCanGoBack(bool can_go_back);
void SetCanGoForward(bool can_go_forward);
diff --git a/CefSharp.Example/Resources/PopupsTest.html b/CefSharp.Example/Resources/PopupsTest.html
new file mode 100644
index 000000000..3bc0a7f06
--- /dev/null
+++ b/CefSharp.Example/Resources/PopupsTest.html
@@ -0,0 +1,11 @@
+
+
+
+ Popup Test
+
+
+ target=_blank
+
+ window.open()
+
+
diff --git a/CefSharp.Example/Resources/TooltipTest.html b/CefSharp.Example/Resources/TooltipTest.html
new file mode 100644
index 000000000..dc2f84ff8
--- /dev/null
+++ b/CefSharp.Example/Resources/TooltipTest.html
@@ -0,0 +1,13 @@
+
+
+
+ Scheme Handler Test
+
+
+
+
+
\ No newline at end of file
diff --git a/CefSharp.WinForms.Example/Browser.Designer.cs b/CefSharp.WinForms.Example/Browser.Designer.cs
index 2591ca197..d5b52b570 100644
--- a/CefSharp.WinForms.Example/Browser.Designer.cs
+++ b/CefSharp.WinForms.Example/Browser.Designer.cs
@@ -48,6 +48,7 @@
this.testBindMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.testConsoleMessageMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.testTooltipMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.testPopupMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripContainer.ContentPanel.SuspendLayout();
this.toolStripContainer.TopToolStripPanel.SuspendLayout();
this.toolStripContainer.SuspendLayout();
@@ -177,7 +178,8 @@
this.testEvaluateScriptMenuItem,
this.testBindMenuItem,
this.testConsoleMessageMenuItem,
- this.testTooltipMenuItem});
+ this.testTooltipMenuItem,
+ this.testPopupMenuItem});
this.testsToolStripMenuItem.Name = "testsToolStripMenuItem";
this.testsToolStripMenuItem.Size = new System.Drawing.Size(46, 20);
this.testsToolStripMenuItem.Text = "Tests";
@@ -224,6 +226,12 @@
this.testTooltipMenuItem.Size = new System.Drawing.Size(254, 22);
this.testTooltipMenuItem.Text = "Test Tooltip";
//
+ // testPopupMenuItem
+ //
+ this.testPopupMenuItem.Name = "testPopupMenuItem";
+ this.testPopupMenuItem.Size = new System.Drawing.Size(254, 22);
+ this.testPopupMenuItem.Text = "Test Popup";
+ //
// Browser
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -271,6 +279,7 @@
private System.Windows.Forms.ToolStripMenuItem testConsoleMessageMenuItem;
private System.Windows.Forms.Label outputLabel;
private System.Windows.Forms.ToolStripMenuItem testTooltipMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem testPopupMenuItem;
}
}
\ No newline at end of file
diff --git a/CefSharp.WinForms.Example/Browser.cs b/CefSharp.WinForms.Example/Browser.cs
index bd208a07c..de3202121 100644
--- a/CefSharp.WinForms.Example/Browser.cs
+++ b/CefSharp.WinForms.Example/Browser.cs
@@ -62,6 +62,12 @@ namespace CefSharp.WinForms.Example
remove { testTooltipMenuItem.Click -= value; }
}
+ public event EventHandler TestPopupActivated
+ {
+ add { testPopupMenuItem.Click += value; }
+ remove { testPopupMenuItem.Click -= value; }
+ }
+
public event EventHandler ExitActivated
{
add { exitToolStripMenuItem.Click += value; }
diff --git a/CefSharp.Wpf.Example/MainWindow.xaml b/CefSharp.Wpf.Example/MainWindow.xaml
index 449f22ee7..6283cd4c9 100644
--- a/CefSharp.Wpf.Example/MainWindow.xaml
+++ b/CefSharp.Wpf.Example/MainWindow.xaml
@@ -16,6 +16,7 @@
+