Skip to content
Browse files

Merge remote branch 'therealmitchconnors/master'

Conflicts:
	WebKitBrowserTest/WebKitBrowserTest.csproj

Signed-off-by: Peter Nelson <peter@peterdn.com>
  • Loading branch information...
2 parents 917910e + be36ec5 commit eafdae38af58d52f750b39602a75837577952415 @peterdn peterdn committed Jun 9, 2011
View
19 WebKitBrowser/WebKitBrowser.cs
@@ -200,6 +200,25 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
#region Public properties
/// <summary>
+ /// The HTTP Basic Authentication UserName
+ /// </summary>
+ [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public string UserName
+ {
+ get { return core.UserName; }
+ set { core.UserName = value; }
+ }
+
+ /// <summary>
+ /// The HTTP Basic Authentication Password
+ /// </summary>
+ [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public string Password
+ {
+ set { core.Password = value; }
+ }
+
+ /// <summary>
/// The current print page settings.
/// </summary>
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
View
54 WebKitBrowserTest/MainForm.Designer.cs
@@ -67,6 +67,7 @@ private void InitializeComponent()
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.setPasswordToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pageSourceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -77,9 +78,9 @@ private void InitializeComponent()
this.tToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.newWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.test2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.tabControl = new System.Windows.Forms.TabControl();
this.jSTestPageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.test3ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.tabControl = new System.Windows.Forms.TabControl();
this.navigationBar = new WebKitBrowserTest.NavigationBar();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
@@ -177,18 +178,26 @@ private void InitializeComponent()
// editToolStripMenuItem
//
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.copyToolStripMenuItem});
+ this.copyToolStripMenuItem,
+ this.setPasswordToolStripMenuItem});
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
this.editToolStripMenuItem.Text = "&Edit";
//
// copyToolStripMenuItem
//
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
- this.copyToolStripMenuItem.Size = new System.Drawing.Size(102, 22);
+ this.copyToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.copyToolStripMenuItem.Text = "&Copy";
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
//
+ // setPasswordToolStripMenuItem
+ //
+ this.setPasswordToolStripMenuItem.Name = "setPasswordToolStripMenuItem";
+ this.setPasswordToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.setPasswordToolStripMenuItem.Text = "&Set Password";
+ this.setPasswordToolStripMenuItem.Click += new System.EventHandler(this.setPasswordToolStripMenuItem_Click);
+ //
// viewToolStripMenuItem
//
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -215,7 +224,7 @@ private void InitializeComponent()
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
- this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.aboutToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
this.aboutToolStripMenuItem.Text = "&About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
@@ -236,61 +245,61 @@ private void InitializeComponent()
// testPageToolStripMenuItem
//
this.testPageToolStripMenuItem.Name = "testPageToolStripMenuItem";
- this.testPageToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.testPageToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.testPageToolStripMenuItem.Text = "Test Page";
this.testPageToolStripMenuItem.Click += new System.EventHandler(this.testPageToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
- this.toolStripMenuItem1.Size = new System.Drawing.Size(149, 6);
+ this.toolStripMenuItem1.Size = new System.Drawing.Size(142, 6);
//
// tToolStripMenuItem
//
this.tToolStripMenuItem.Name = "tToolStripMenuItem";
- this.tToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.tToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.tToolStripMenuItem.Text = "Test 1";
this.tToolStripMenuItem.Click += new System.EventHandler(this.tToolStripMenuItem_Click);
//
// newWindowToolStripMenuItem
//
this.newWindowToolStripMenuItem.Name = "newWindowToolStripMenuItem";
- this.newWindowToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.newWindowToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.newWindowToolStripMenuItem.Text = "New &Window";
this.newWindowToolStripMenuItem.Click += new System.EventHandler(this.newWindowToolStripMenuItem_Click);
//
// test2ToolStripMenuItem
//
this.test2ToolStripMenuItem.Name = "test2ToolStripMenuItem";
- this.test2ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.test2ToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.test2ToolStripMenuItem.Text = "Test 2";
this.test2ToolStripMenuItem.Click += new System.EventHandler(this.test2ToolStripMenuItem_Click);
//
- // tabControl
- //
- this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tabControl.Location = new System.Drawing.Point(0, 73);
- this.tabControl.Name = "tabControl";
- this.tabControl.SelectedIndex = 0;
- this.tabControl.Size = new System.Drawing.Size(662, 333);
- this.tabControl.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
- this.tabControl.TabIndex = 2;
- //
// jSTestPageToolStripMenuItem
//
this.jSTestPageToolStripMenuItem.Name = "jSTestPageToolStripMenuItem";
- this.jSTestPageToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.jSTestPageToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.jSTestPageToolStripMenuItem.Text = "JS Test Page";
this.jSTestPageToolStripMenuItem.Click += new System.EventHandler(this.jSTestPageToolStripMenuItem_Click);
//
// test3ToolStripMenuItem
//
this.test3ToolStripMenuItem.Name = "test3ToolStripMenuItem";
- this.test3ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.test3ToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.test3ToolStripMenuItem.Text = "Test 3";
this.test3ToolStripMenuItem.Click += new System.EventHandler(this.test3ToolStripMenuItem_Click);
//
+ // tabControl
+ //
+ this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tabControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tabControl.Location = new System.Drawing.Point(0, 73);
+ this.tabControl.Name = "tabControl";
+ this.tabControl.SelectedIndex = 0;
+ this.tabControl.Size = new System.Drawing.Size(662, 333);
+ this.tabControl.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
+ this.tabControl.TabIndex = 2;
+ //
// navigationBar
//
this.navigationBar.Dock = System.Windows.Forms.DockStyle.Top;
@@ -348,6 +357,7 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem test2ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem jSTestPageToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem test3ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem setPasswordToolStripMenuItem;
}
}
View
10 WebKitBrowserTest/MainForm.cs
@@ -332,5 +332,15 @@ private class TestClass
public double i { get; set; }
public bool b { get; set; }
}
+
+ private void setPasswordToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ PasswordDialog passDG = new PasswordDialog();
+ if (passDG.ShowDialog() == System.Windows.Forms.DialogResult.OK)
+ {
+ currentPage.browser.Password = passDG.Password;
+ currentPage.browser.UserName = passDG.Username;
+ }
+ }
}
}
View
40 WebKitBrowserTest/PasswordDialog.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace WebKitBrowserTest
+{
+ public partial class PasswordDialog : Form
+ {
+ public PasswordDialog()
+ {
+ InitializeComponent();
+ }
+
+ public string Username
+ {
+ get { return this.usernameTextBox.Text; }
+ set { this.usernameTextBox.Text = value; }
+ }
+
+ public string Password
+ {
+ get { return this.passwordTextBox.Text; }
+ set { this.passwordTextBox.Text = value; }
+ }
+
+ private void OKButton_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = System.Windows.Forms.DialogResult.OK;
+ }
+
+ private void CancelButton_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ }
+ }
+}
View
142 WebKitBrowserTest/PasswordDialog.designer.cs
@@ -0,0 +1,142 @@
+namespace WebKitBrowserTest
+{
+ partial class PasswordDialog
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.OKButton = new System.Windows.Forms.Button();
+ this.CancelButton = new System.Windows.Forms.Button();
+ this.usernameTextBox = new System.Windows.Forms.TextBox();
+ this.passwordTextBox = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // OKButton
+ //
+ this.OKButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.OKButton.Location = new System.Drawing.Point(86, 115);
+ this.OKButton.Name = "OKButton";
+ this.OKButton.Size = new System.Drawing.Size(75, 23);
+ this.OKButton.TabIndex = 0;
+ this.OKButton.Text = "OK";
+ this.OKButton.UseVisualStyleBackColor = true;
+ this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
+ //
+ // CancelButton
+ //
+ this.CancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.CancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.CancelButton.Location = new System.Drawing.Point(167, 115);
+ this.CancelButton.Name = "CancelButton";
+ this.CancelButton.Size = new System.Drawing.Size(75, 23);
+ this.CancelButton.TabIndex = 1;
+ this.CancelButton.Text = "Cancel";
+ this.CancelButton.UseVisualStyleBackColor = true;
+ this.CancelButton.Click += new System.EventHandler(this.CancelButton_Click);
+ //
+ // usernameTextBox
+ //
+ this.usernameTextBox.Location = new System.Drawing.Point(76, 53);
+ this.usernameTextBox.Name = "usernameTextBox";
+ this.usernameTextBox.Size = new System.Drawing.Size(166, 20);
+ this.usernameTextBox.TabIndex = 2;
+ //
+ // passwordTextBox
+ //
+ this.passwordTextBox.Location = new System.Drawing.Point(76, 79);
+ this.passwordTextBox.Name = "passwordTextBox";
+ this.passwordTextBox.PasswordChar = '*';
+ this.passwordTextBox.Size = new System.Drawing.Size(166, 20);
+ this.passwordTextBox.TabIndex = 3;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 56);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(58, 13);
+ this.label1.TabIndex = 4;
+ this.label1.Text = "Username:";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(14, 82);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(56, 13);
+ this.label2.TabIndex = 5;
+ this.label2.Text = "Password:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(12, 9);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(241, 13);
+ this.label3.TabIndex = 6;
+ this.label3.Text = "Please enter your username and password below.";
+ //
+ // PasswordDialog
+ //
+ this.AcceptButton = this.OKButton;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(254, 150);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.passwordTextBox);
+ this.Controls.Add(this.usernameTextBox);
+ this.Controls.Add(this.CancelButton);
+ this.Controls.Add(this.OKButton);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.HelpButton = true;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "PasswordDialog";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "PasswordDialog";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button OKButton;
+ private System.Windows.Forms.Button CancelButton;
+ private System.Windows.Forms.TextBox usernameTextBox;
+ private System.Windows.Forms.TextBox passwordTextBox;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label3;
+ }
+}
View
120 WebKitBrowserTest/PasswordDialog.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
View
5 WebKitBrowserTest/Program.cs
@@ -36,10 +36,13 @@ static class Program
/// The main entry point for the application.
/// </summary>
[STAThread]
- static void Main()
+ static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
+ List<string> largs = new List<string>(args);
+ if (largs.Contains("/IgnoreSSL"))
+ Environment.SetEnvironmentVariable("WEBKIT_IGNORE_SSL_ERRORS", "1");
Application.Run(new MainForm());
}
}
View
19 WebKitBrowserTest/WebKitBrowserTest.csproj
@@ -101,6 +101,12 @@
<Compile Include="NavigationBar.Designer.cs">
<DependentUpon>NavigationBar.cs</DependentUpon>
</Compile>
+ <Compile Include="PasswordDialog.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="PasswordDialog.designer.cs">
+ <DependentUpon>PasswordDialog.cs</DependentUpon>
+ </Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="DownloadForm.resx">
@@ -115,6 +121,9 @@
<EmbeddedResource Include="NavigationBar.resx">
<DependentUpon>NavigationBar.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="PasswordDialog.resx">
+ <DependentUpon>PasswordDialog.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -171,6 +180,16 @@
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\WebKitBrowser\WebKitBrowser.csproj">
+ <Project>{44AFE214-12C7-4280-898D-A7C4AABF1533}</Project>
+ <Name>WebKitBrowser</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\WebKitCore\WebKitCore.csproj">
+ <Project>{D1C8CE15-4279-45DA-989A-54561E0FD842}</Project>
+ <Name>WebKitCore</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
View
15 WebKitCore/WebKitBrowserCore.cs
@@ -128,6 +128,16 @@ public class WebKitBrowserCore : IWebKitBrowser
#region Public properties
/// <summary>
+ /// The HTTP Basic Authentication UserName
+ /// </summary>
+ public string UserName { get; set; }
+
+ /// <summary>
+ /// The HTTP Basic Authentication Password
+ /// </summary>
+ public string Password { private get; set; }
+
+ /// <summary>
/// The current print page settings.
/// </summary>
public PageSettings PageSettings { get; set; }
@@ -879,6 +889,11 @@ public void Navigate(string url)
request.initWithURL(url, _WebURLRequestCachePolicy.WebURLRequestUseProtocolCachePolicy, 60);
request.setHTTPMethod("GET");
+ //use basic authentication if username and password are supplied.
+ if (!string.IsNullOrEmpty(UserName) && !string.IsNullOrEmpty(Password))
+ request.setValue("Basic " + Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(
+ string.Format("{0}:{1}", UserName, Password))), "Authorization");
+
webView.mainFrame().loadRequest((WebURLRequest)request);
activationContext.Deactivate();
View
7 build_webkit.interop_2010.bat
@@ -0,0 +1,7 @@
+@call "$(DevEnvDir)..\..\VC\vcvarsall.bat" x86
+if not exist "tools\TypeNormalizer.exe" "C:\Windows\Microsoft.NET\Framework\v2.0.50727/csc.exe" /out:"tools\TypeNormalizer.exe" "tools\TypeNormalizer.cs"
+"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\tlbimp.exe" "webkit\webkit.tlb" /silent /keyfile:"WebKit.NET.snk" /namespace:WebKit.Interop /out:"webkit\WebKit.Interop.dll"
+"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ildasm.exe" "webkit\WebKit.Interop.dll" /out="webkit\temp_webkit_interop.il" /nobar
+"tools\TypeNormalizer.exe" "webkit\temp_webkit_interop.il"
+"C:\Windows\Microsoft.NET\Framework\v2.0.50727/ilasm.exe" "webkit\temp_webkit_interop.il" /dll /output="webkit\WebKit.Interop.dll" /key="WebKit.NET.snk"
+del /F /Q "webkit\temp_webkit_interop.*"

0 comments on commit eafdae3

Please sign in to comment.
Something went wrong with that request. Please try again.