adding new files and makefiles. implementing a stub for the remote controller

in JS.  not part of the build yet.
This commit is contained in:
sspitzer%netscape.com 2000-02-08 07:32:20 +00:00
Родитель 4befc49f4c
Коммит 0aa1a1cf2c
8 изменённых файлов: 139 добавлений и 15 удалений

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -1,3 +1,4 @@
/*
* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
@ -18,21 +19,14 @@
* Rights Reserved.
*
* Contributor(s):
* Shane Culpepper <pepper@netscape.com>
*/
/*
The interface to the Remote Browser Component.
*/
/* The interface to the Remote Browser Component. */
#include "nsISupports.idl"
%{ C++
#include "nscore.h" // for PRUnichar
%}
[scriptable, uuid(BCE83AE2-1DD1-11B2-BC0E-A9E997E21AD2)]
[scriptable, uuid(048afcc8-1dd2-11b2-bd86-a45b24375deb)]
interface nsIRemoteBrowserControl : nsISupports
{
@ -72,11 +66,7 @@ interface nsIRemoteBrowserControl : nsISupports
};
%{ C++
/* {BCE83AE2-1DD1-11B2-BC0E-A9E997E21AD2} */
#define NS_REMOTEBROWSERCONTROL_CID \
{ 0xbce83ae2, 0x1dd1, 0x11b2, { 0xbc, 0x0e, 0xa9, 0xe9, 0x97, 0xe2, 0x1a, 0xd2} }
%{C++
#define NS_REMOTEBROWSERCONTROL_PROGID \
"component://netscape/browser/remote-browser-control"
%}

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -0,0 +1,32 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
install::
$(INSTALL) remoteControl.js $(DIST)/bin/components
include $(topsrcdir)/config/rules.mk

Просмотреть файл

Просмотреть файл

@ -0,0 +1,102 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released March
* 31, 1998.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Seth Spitzer <sspitzer@netscape.com>
*/
var remoteControlProgID = "component://netscape/browser/remote-browser-control"
var nsIRemoteBrowserControl = Components.interfaces.nsIRemoteBrowserControl;
function BrowserRemoteControl() {
return browserRemoteControl;
}
// We need to implement nsIRemoteBrowserControl
var browserRemoteControl = {
openURL: function(aURL, newWindow)
{
dump("openURL(" + aURL + "," + newWindow + "\n");
}
openFile: function(aURL)
{
dump("openFile(" + aURL+ "\n");
}
saveAs: function(aURL)
{
dump("saveAs(" + aURL + "\n");
}
mailto: function(mailToList)
{
dump("mailto(" + mailToList + "\n");
}
addBookmark(aURL, aTitle)
{
dump("addBookmark(" + aURL + "," + aTitle + "\n");
}
};
var module = {
registerSelf: function (compMgr, fileSpec, location, type) {
dump("registerSelf for remoteControl\n");
compMgr.registerComponentWithType(this.myCID,
"Browser Remote Control",
remoteControlProgID
fileSpec, location, true, true,
type);
},
getClassObject: function (compMgr, cid, iid) {
if (!cid.equals(this.myCID))
throw Components.results.NS_ERROR_NO_INTERFACE;
if (!iid.equals(Components.interfaces.nsIFactory))
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
return this.myFactory;
},
canUnload: function () {
},
myCID: Components.ID("{97c8d0de-1dd1-11b2-bc64-86a3aaf8f5c5}"),
myFactory: {
CreateInstance: function (outer, iid) {
if (outer != null)
throw Components.results.NS_ERROR_NO_AGGREGATION;
if (!(iid.equals(nsIRemoteBrowserControl) ||
iid.equals(Components.interfaces.nsISupports))) {
throw Components.results.NS_ERROR_INVALID_ARG;
}
return new BrowserRemoteControl();
}
}
};
function NSGetModule(compMgr, fileSpec) { return module; }