зеркало из https://github.com/mozilla/pjs.git
Move webbrowserpersist code to components/ directory. b=106554 r=brade@netscape.com sr=sfraser@netscape.com
This commit is contained in:
Родитель
1d34ad3f51
Коммит
f842bce88a
|
@ -0,0 +1,29 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla 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/MPL/
|
||||
#
|
||||
# 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, Inc. Portions created by Netscape are
|
||||
# Copyright (C) 2001, Mozilla. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = public src
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,2 @@
|
|||
nsCWebBrowserPersist.idl
|
||||
nsIWebBrowserPersist.idl
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# 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) 2001 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = webbrowserpersist
|
||||
XPIDL_MODULE = webbrowserpersist
|
||||
|
||||
XPIDLSRCS = nsIWebBrowserPersist.idl \
|
||||
nsCWebBrowserPersist.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla 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/MPL/
|
||||
#
|
||||
# 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, Inc. Portions created by Netscape are
|
||||
# Copyright (C) 2001, Mozilla. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
|
||||
MODULE=webbrowserpersist
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\nsIWebBrowserPersist.idl \
|
||||
.\nsCWebBrowserPersist.idl \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
||||
*
|
||||
* 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications, Inc. Portions created by Netscape are
|
||||
* Copyright (C) 1999, Mozilla. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Adam Lock <adamlock@netscape.com>
|
||||
*/
|
||||
|
||||
#include "nsIWebBrowserPersist.idl"
|
||||
|
||||
%{ C++
|
||||
// {7E677795-C582-4cd1-9E8D-8271B3474D2A}
|
||||
#define NS_WEBBROWSERPERSIST_CID \
|
||||
{ 0x7e677795, 0xc582, 0x4cd1, { 0x9e, 0x8d, 0x82, 0x71, 0xb3, 0x47, 0x4d, 0x2a } }
|
||||
#define NS_WEBBROWSERPERSIST_CONTRACTID \
|
||||
"@mozilla.org/embedding/browser/nsWebBrowserPersist;1"
|
||||
%}
|
|
@ -0,0 +1,116 @@
|
|||
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
||||
*
|
||||
* 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications, Inc. Portions created by Netscape are
|
||||
* Copyright (C) 1999, Mozilla. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Adam Lock <adamlock@netscape.com>
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIURI;
|
||||
interface nsIInputStream;
|
||||
interface nsIDOMDocument;
|
||||
interface nsIWebProgressListener;
|
||||
interface nsILocalFile;
|
||||
|
||||
/**
|
||||
* @status UNDER_REVIEW
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface for persisting DOM documents and URIs to local storage.
|
||||
*/
|
||||
[scriptable, uuid(814ba433-a816-4785-9f95-ad3ba0a43dab)]
|
||||
interface nsIWebBrowserPersist : nsISupports
|
||||
{
|
||||
/** No special persistence behaviour. */
|
||||
const unsigned long PERSIST_FLAGS_NONE = 0;
|
||||
/** Only use cached data (could result in failure if data is not cached). */
|
||||
const unsigned long PERSIST_FLAGS_FROM_CACHE = 1;
|
||||
/** Bypass the cached data. */
|
||||
const unsigned long PERSIST_FLAGS_BYPASS_CACHE = 2;
|
||||
/** Ignore any redirected data (usually adverts). */
|
||||
const unsigned long PERSIST_FLAGS_IGNORE_REDIRECTED_DATA = 4;
|
||||
/** Ignore IFRAME content (usually adverts). */
|
||||
const unsigned long PERSIST_FLAGS_IGNORE_IFRAMES = 8;
|
||||
|
||||
/** Flags governing how data is fetched from the network. */
|
||||
attribute unsigned long persistFlags;
|
||||
|
||||
/** Persister is ready to save data */
|
||||
const unsigned long PERSIST_STATE_READY = 1;
|
||||
/** Persister is saving data */
|
||||
const unsigned long PERSIST_STATE_SAVING = 2;
|
||||
/** Persister has finished saving data */
|
||||
const unsigned long PERSIST_STATE_FINISHED = 3;
|
||||
|
||||
/**
|
||||
* Current state of the persister object.
|
||||
*/
|
||||
readonly attribute unsigned long currentState;
|
||||
|
||||
/**
|
||||
* Value indicating the success or failure of the persist
|
||||
* operation.
|
||||
*
|
||||
* @return NS_OK Operation was successful or is still ongoing.
|
||||
* @return NS_BINDING_ABORTED Operation cancelled.
|
||||
* @return NS_ERROR_FAILURE Non-specific failure.
|
||||
*/
|
||||
readonly attribute unsigned long result;
|
||||
|
||||
/**
|
||||
* Callback listener for progress notifications.
|
||||
*/
|
||||
attribute nsIWebProgressListener progressListener;
|
||||
|
||||
/**
|
||||
* Save the specified URI to file.
|
||||
*
|
||||
* @param aURI URI to save to file or <CODE>nsnull</CODE>
|
||||
* to use current URI if the implementation supports such
|
||||
* a concept.
|
||||
* @param aPostData Data to pass with in an HTTP request or nsnull.
|
||||
* @param aFile Target local file.
|
||||
*
|
||||
* @return NS_OK Operation has been started.
|
||||
* @return NS_ERROR_INVALID_ARG One or more arguments was invalid.
|
||||
*/
|
||||
void saveURI(in nsIURI aURI, in nsIInputStream aPostData, in nsILocalFile aFile);
|
||||
|
||||
/**
|
||||
* Save the specified DOM document to file and optionally all linked files
|
||||
* (e.g. images, CSS, JS & subframes). Do not call this method until the
|
||||
* document has finished loading!
|
||||
*
|
||||
* @param aDocument Document to save to file.
|
||||
* @param aFile Target local file.
|
||||
* @param aDataPath Path to folder (which must already exist) to save
|
||||
* linked files to or nsnull.
|
||||
*
|
||||
* @return NS_OK Operation has been started.
|
||||
* @return NS_ERROR_INVALID_ARG One or more arguments was invalid.
|
||||
*/
|
||||
void saveDocument(in nsIDOMDocument aDocument, in nsILocalFile aFile, in nsILocalFile aDataPath);
|
||||
|
||||
/**
|
||||
* Cancels the current operation. The caller is responsible for cleaning up
|
||||
* partially written files or directories.
|
||||
*/
|
||||
void cancelSave();
|
||||
};
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче