Skip to content

Commit bf1c547

Browse files
committed
Merge branch 'working'
2 parents 29e87da + f998023 commit bf1c547

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+8910
-0
lines changed

.hgignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
syntax: regexp
2+
^win32/.*debug/
3+
^win32/.*Debug/
4+
^win32/.*release/
5+
^win32/.*Release/
6+
^win32/.*\.suo
7+
\.ncb
8+
\.\#
9+
^gtk/test$
10+
\.DS_Store
11+
Cache/
12+
\.orig$
13+
^qt/.*debug/
14+
^qt/.*release/
15+
^qt/.*\.sln
16+
^qt/.*\.suo
17+
^qt/.*\.vcproj.*
18+
^qt/.*\.idb
19+
^qt/.*\.pdb
20+
^qt/.*Makefile.*
21+
~$

Gecko.vcproj

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
<?xml version="1.0" encoding="Windows-1252"?>
2+
<VisualStudioProject
3+
ProjectType="Visual C++"
4+
Version="9.00"
5+
Name="Gecko"
6+
ProjectGUID="{0BF4391A-0568-45ED-BFFD-07044D6CA264}"
7+
RootNamespace="Gecko"
8+
Keyword="Win32Proj"
9+
TargetFrameworkVersion="196613"
10+
>
11+
<Platforms>
12+
<Platform
13+
Name="Win32"
14+
/>
15+
</Platforms>
16+
<ToolFiles>
17+
</ToolFiles>
18+
<Configurations>
19+
<Configuration
20+
Name="Debug|Win32"
21+
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
22+
IntermediateDirectory="$(ConfigurationName)"
23+
ConfigurationType="4"
24+
UseOfMFC="1"
25+
CharacterSet="1"
26+
>
27+
<Tool
28+
Name="VCPreBuildEventTool"
29+
/>
30+
<Tool
31+
Name="VCCustomBuildTool"
32+
/>
33+
<Tool
34+
Name="VCXMLDataGeneratorTool"
35+
/>
36+
<Tool
37+
Name="VCWebServiceProxyGeneratorTool"
38+
/>
39+
<Tool
40+
Name="VCMIDLTool"
41+
/>
42+
<Tool
43+
Name="VCCLCompilerTool"
44+
Optimization="0"
45+
AdditionalIncludeDirectories="&quot;$(InputDir)..\external\wtl\include&quot;;&quot;$(InputDir)..\include&quot;;&quot;$(InputDir)..\gist\$(IntDir)&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\xulapp&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\nspr&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\xpcom&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\embed_base&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\windowwatcher&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\webbrwsr&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\shistory&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\uriloader&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\dom&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\necko&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\widget&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\docshell&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\profile&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\gfx&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\pref&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\string&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\profdirserviceprovider&quot;"
46+
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;XP_WIN;XPCOM_GLUE"
47+
MinimalRebuild="true"
48+
BasicRuntimeChecks="3"
49+
RuntimeLibrary="1"
50+
TreatWChar_tAsBuiltInType="false"
51+
UsePrecompiledHeader="0"
52+
WarningLevel="3"
53+
DebugInformationFormat="4"
54+
/>
55+
<Tool
56+
Name="VCManagedResourceCompilerTool"
57+
/>
58+
<Tool
59+
Name="VCResourceCompilerTool"
60+
/>
61+
<Tool
62+
Name="VCPreLinkEventTool"
63+
/>
64+
<Tool
65+
Name="VCLibrarianTool"
66+
/>
67+
<Tool
68+
Name="VCALinkTool"
69+
/>
70+
<Tool
71+
Name="VCXDCMakeTool"
72+
/>
73+
<Tool
74+
Name="VCBscMakeTool"
75+
/>
76+
<Tool
77+
Name="VCFxCopTool"
78+
/>
79+
<Tool
80+
Name="VCPostBuildEventTool"
81+
/>
82+
</Configuration>
83+
<Configuration
84+
Name="Release|Win32"
85+
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
86+
IntermediateDirectory="$(ConfigurationName)"
87+
ConfigurationType="4"
88+
UseOfMFC="1"
89+
CharacterSet="1"
90+
WholeProgramOptimization="1"
91+
>
92+
<Tool
93+
Name="VCPreBuildEventTool"
94+
/>
95+
<Tool
96+
Name="VCCustomBuildTool"
97+
/>
98+
<Tool
99+
Name="VCXMLDataGeneratorTool"
100+
/>
101+
<Tool
102+
Name="VCWebServiceProxyGeneratorTool"
103+
/>
104+
<Tool
105+
Name="VCMIDLTool"
106+
/>
107+
<Tool
108+
Name="VCCLCompilerTool"
109+
Optimization="2"
110+
EnableIntrinsicFunctions="true"
111+
AdditionalIncludeDirectories="&quot;$(InputDir)..\external\wtl\include&quot;;&quot;$(InputDir)..\include&quot;;&quot;$(InputDir)..\gist\$(IntDir)&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\xulapp&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\nspr&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\xpcom&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\embed_base&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\windowwatcher&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\webbrwsr&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\shistory&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\uriloader&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\dom&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\necko&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\widget&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\docshell&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\profile&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\gfx&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\pref&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\string&quot;;&quot;$(InputDir)..\external\xulrunner-sdk\include\profdirserviceprovider&quot;"
112+
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;XP_WIN;XPCOM_GLUE"
113+
RuntimeLibrary="0"
114+
EnableFunctionLevelLinking="true"
115+
TreatWChar_tAsBuiltInType="false"
116+
UsePrecompiledHeader="0"
117+
WarningLevel="3"
118+
DebugInformationFormat="3"
119+
/>
120+
<Tool
121+
Name="VCManagedResourceCompilerTool"
122+
/>
123+
<Tool
124+
Name="VCResourceCompilerTool"
125+
/>
126+
<Tool
127+
Name="VCPreLinkEventTool"
128+
/>
129+
<Tool
130+
Name="VCLibrarianTool"
131+
/>
132+
<Tool
133+
Name="VCALinkTool"
134+
/>
135+
<Tool
136+
Name="VCXDCMakeTool"
137+
/>
138+
<Tool
139+
Name="VCBscMakeTool"
140+
/>
141+
<Tool
142+
Name="VCFxCopTool"
143+
/>
144+
<Tool
145+
Name="VCPostBuildEventTool"
146+
/>
147+
</Configuration>
148+
</Configurations>
149+
<References>
150+
</References>
151+
<Files>
152+
<Filter
153+
Name="Source Files"
154+
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
155+
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
156+
>
157+
<File
158+
RelativePath=".\common\ConsoleListener.cpp"
159+
>
160+
</File>
161+
<File
162+
RelativePath=".\common\ContentListener.cpp"
163+
>
164+
</File>
165+
<File
166+
RelativePath=".\common\DOMEventListener.cpp"
167+
>
168+
</File>
169+
<File
170+
RelativePath=".\common\embed.cpp"
171+
>
172+
</File>
173+
<File
174+
RelativePath=".\common\EmbeddingSetup.cpp"
175+
>
176+
</File>
177+
<File
178+
RelativePath=".\common\WebBrowserChrome.cpp"
179+
>
180+
</File>
181+
</Filter>
182+
<Filter
183+
Name="Header Files"
184+
Filter="h;hpp;hxx;hm;inl;inc;xsd"
185+
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
186+
>
187+
<File
188+
RelativePath=".\common\ConsoleListener.h"
189+
>
190+
</File>
191+
<File
192+
RelativePath=".\common\ContentListener.h"
193+
>
194+
</File>
195+
<File
196+
RelativePath=".\common\DOMEventListener.h"
197+
>
198+
</File>
199+
<File
200+
RelativePath=".\common\embed.h"
201+
>
202+
</File>
203+
<File
204+
RelativePath=".\common\EmbeddingSetup.h"
205+
>
206+
</File>
207+
<File
208+
RelativePath=".\common\WebBrowserChrome.h"
209+
>
210+
</File>
211+
</Filter>
212+
<Filter
213+
Name="Resource Files"
214+
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215+
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216+
>
217+
</Filter>
218+
<File
219+
RelativePath=".\ReadMe.txt"
220+
>
221+
</File>
222+
</Files>
223+
<Globals>
224+
</Globals>
225+
</VisualStudioProject>

GeckoReadMe.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
========================================================================
2+
STATIC LIBRARY : Gecko Project Overview
3+
========================================================================
4+
5+
AppWizard has created this Gecko library project for you.
6+
7+
No source files were created as part of your project.
8+
9+
10+
Gecko.vcproj
11+
This is the main project file for VC++ projects generated using an Application Wizard.
12+
It contains information about the version of Visual C++ that generated the file, and
13+
information about the platforms, configurations, and project features selected with the
14+
Application Wizard.
15+
16+
/////////////////////////////////////////////////////////////////////////////
17+
Other notes:
18+
19+
AppWizard uses "TODO:" comments to indicate parts of the source code you
20+
should add to or customize.
21+
22+
/////////////////////////////////////////////////////////////////////////////

common/ConsoleListener.cpp

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/* ***** BEGIN LICENSE BLOCK *****
2+
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
3+
*
4+
* The contents of this file are subject to the Mozilla Public License Version
5+
* 1.1 (the "License"); you may not use this file except in compliance with
6+
* the License. You may obtain a copy of the License at
7+
* http://www.mozilla.org/MPL/
8+
*
9+
* Software distributed under the License is distributed on an "AS IS" basis,
10+
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11+
* for the specific language governing rights and limitations under the
12+
* License.
13+
*
14+
* The Original Code is mozilla.org code.
15+
*
16+
* The Initial Developer of the Original Code is Nokia
17+
* Portions created by the Initial Developer are Copyright (C) 2008
18+
* the Initial Developer. All Rights Reserved.
19+
*
20+
* Contributor(s):
21+
* Tobias Hunger <[email protected]>
22+
* Steffen.Imhof <[email protected]>
23+
* Tatiana Meshkova <[email protected]>
24+
*
25+
* Alternatively, the contents of this file may be used under the terms of
26+
* either the GNU General Public License Version 2 or later (the "GPL"), or
27+
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28+
* in which case the provisions of the GPL or the LGPL are applicable instead
29+
* of those above. If you wish to allow use of your version of this file only
30+
* under the terms of either the GPL or the LGPL, and not to allow others to
31+
* use your version of this file under the terms of the MPL, indicate your
32+
* decision by deleting the provisions above and replace them with the notice
33+
* and other provisions required by the GPL or the LGPL. If you do not delete
34+
* the provisions above, a recipient may use your version of this file under
35+
* the terms of any one of the MPL, the GPL or the LGPL.
36+
*
37+
* ***** END LICENSE BLOCK ***** */
38+
39+
#include "ConsoleListener.h"
40+
#include "nsStringAPI.h"
41+
42+
#include "embed.h"
43+
44+
NS_IMPL_ISUPPORTS1(ConsoleListener,
45+
nsIConsoleListener)
46+
47+
ConsoleListener::ConsoleListener(MozView *aOwner) :
48+
mOwner(aOwner)
49+
{ }
50+
51+
ConsoleListener::~ConsoleListener()
52+
{ }
53+
54+
void ConsoleListener::Detach()
55+
{
56+
mOwner = NULL;
57+
}
58+
59+
NS_IMETHODIMP ConsoleListener::Observe(nsIConsoleMessage * aMessage)
60+
{
61+
if (!mOwner)
62+
return NS_OK;
63+
64+
MozViewListener *listener = mOwner->GetListener();
65+
if (!listener)
66+
return NS_OK;
67+
68+
nsString msg;
69+
nsresult rv = aMessage->GetMessageMoz(getter_Copies(msg));
70+
if (NS_SUCCEEDED(rv))
71+
{
72+
listener->OnConsoleMessage(NS_ConvertUTF16toUTF8(msg).get());
73+
}
74+
return NS_OK;
75+
}

0 commit comments

Comments
 (0)