Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
edburns%acm.org 7901d20cd3 Manage Bookmarks now works. You can click on links and the browser will go there. 2002-05-08 05:17:41 +00:00
ashuk%eng.sun.com 49ccb36ceb Merging JAVADEV_RTM_20001102 into Trunk
_Ashu
2001-04-02 21:18:06 +00:00
edburns%acm.org e6a5d40f61 bug: 55004
r=ashuk
a=edburns

This fix makes it so bookmarks work with the tip of the branch as of 11/01/00.

This fix removes the necessity to modify xpcom/base/nsDebug.cpp to
remove the thread safety assertions.

This fix primarily does two things:

1. Make nsActionEvents for all bookmarks/rdf actions

2. Remove the synchronized(this.browserControlCanvas.getTreeLock()) call
around nativeProcessEvents() in NativeEventThread.run().

Files in this fix:

M classes_spec/org/mozilla/webclient/test/EMWindow.java
M classes_spec/org/mozilla/webclient/wrapper_native/BookmarkEntryImpl.java
M classes_spec/org/mozilla/webclient/wrapper_native/BookmarksImpl.java
M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M classes_spec/org/mozilla/webclient/wrapper_native/RDFEnumeration.java
M classes_spec/org/mozilla/webclient/wrapper_native/RDFTreeNode.java
M src_moz/BookmarksImpl.cpp
M src_moz/RDFEnumeration.cpp
M src_moz/RDFTreeNode.cpp
M src_moz/nsActions.cpp
M src_moz/nsActions.h
M src_moz/motif/NativeLoaderStub.cpp
2000-11-03 03:16:55 +00:00
edburns%acm.org e2ea5ace19 These changes make it so webclient compiles with the tip as of 20
September 2000.  It will run, but without bookmarks.

The changes consist of the following kinds of changes:

Changes to method signatures for methods implemented by webclient.

Changes to string functions.

Changes to account for the demise of PROGIDS in favor of ContractIDs

Modified files:

M classes_spec/org/mozilla/webclient/test/EMWindow.java
M src_moz/CBrowserContainer.cpp
M src_moz/CurrentPageImpl.cpp
M src_moz/Makefile.win
M src_moz/NativeEventThread.cpp
M src_moz/RDFEnumeration.cpp
M src_moz/RDFTreeNode.cpp
M src_moz/ns_util_export.cpp
M src_moz/rdf_util.cpp
2000-09-20 21:53:05 +00:00
edburns%acm.org 22af3b9709 bug=47357
a=edburns
r=ashuk

This change creates a new directory, java/webclient/src_share, that
contains the code that will be used in both src_moz and src_ie, and any
other native browser wrapping implementations.

Here are the steps I followed to implement this change.

1. Create a new directory java/webclient/src_share

2. Move all jni_util*.* files from src_moz into src_share

3. Make it so src_share compiles into a new .lib

   src_share has no netscape dependencies.  Any functionality that
   depended on ns dependencies was kept in src_moz.  In this case, we
   have a function prototype only in src_share, with the implementation
   in src_moz.  We did this for nsHashtable.  The other trick was for
   things in WebShellInitContext that had nothing to do with Netscape.
   This case was accomodated by creating a new struct, ShareInitContext,
   that contains all WebShellInitContext members that have nothing to do
   with Netscape.  Currently this is just jobject propertiesClass.  I
   modified the WebShellInitContext struct to contain a ShareContext
   struct as its last member.  There are two new methods in jni_util.h
   that allow for the initialization and deallocation of the members of
   the ShareContext struct.

4. Make it so src_moz uses the new .lib to provide the jni_util behavior

  a. Create ns_util* files that include ../src_share/jni_util* files
  appropriately.

  The only tricky part was for things in jni_util.h that

Here's the list of files in this change.

cvs -z3 -n update (in directory D:\Projects\mozilla\java\webclient)
cvs server: Updating .
M Makefile.win // added src_share to DIRS
M src_moz/BookmarksImpl.cpp             // include ns_util instead of jni_util
M src_moz/CBrowserContainer.cpp         // include ns_util instead of jni_util
M src_moz/CBrowserContainer.h           // include ns_util instead of jni_util
M src_moz/CurrentPageImpl.cpp           // include ns_util instead of jni_util
M src_moz/HistoryImpl.cpp               // include ns_util instead of jni_util
M src_moz/Makefile.win                  // include ns_util instead of jni_util
M src_moz/NativeEventThread.cpp         // include ns_util instead of jni_util
M src_moz/NavigationImpl.cpp            // include ns_util instead of jni_util
M src_moz/RDFEnumeration.cpp            // include ns_util instead of jni_util
M src_moz/RDFTreeNode.cpp               // include ns_util instead of jni_util
M src_moz/WindowControlImpl.cpp         // include ns_util instead of jni_util
                                        // also use new util_InitShareContext
                                        // function
M src_moz/WrapperFactoryImpl.cpp        // include ns_util instead of jni_util
R src_moz/jni_util.cpp                  // moved to ../src_share
R src_moz/jni_util.h                    // moved to ../src_share
R src_moz/jni_util_export.cpp           // moved to ../src_share
R src_moz/jni_util_export.h             // moved to ../src_share
M src_moz/nsActions.cpp                 // include ns_util instead of jni_util
                                        // also use new
util_DeallocateShareContext
M src_moz/nsActions.h                   // include ns_util instead of jni_util
A src_moz/ns_util.cpp                   // include jni_util.h
A src_moz/ns_util.h                     // include jni_util.h, changes to
                                        // WebshellInitContext struct
A src_moz/ns_util_export.cpp            // provide impls for methods in
                                        // jni_util_export.h

A src_share/Makefile.win
A src_share/bal_util.cpp
A src_share/bal_util.h
A src_share/jni_util.cpp
A src_share/jni_util.h
A src_share/jni_util_export.cpp
A src_share/jni_util_export.h

*****CVS exited normally with code 0*****
2000-08-03 21:32:54 +00:00
edburns%acm.org 69c22378c2 bug: 20659
r=gbarney
a=edburns

This checkin adds java.awt.event.MouseListener support to webclient for
mozilla.  The following files are include in this checkin.  "A" is new
file "M" is modified file.

A classes_spec/org/mozilla/webclient/WCMouseEvent.java
A classes_spec/org/mozilla/webclient/wrapper_native/WCMouseListenerImpl.java
A src_moz/DOMMouseListenerImpl.cpp
A src_moz/DOMMouseListenerImpl.h
A src_moz/dom_util.cpp
A src_moz/dom_util.h

M classes_spec/org/mozilla/webclient/EventRegistration.java
M classes_spec/org/mozilla/webclient/test/EMWindow.java
M classes_spec/org/mozilla/webclient/wrapper_native/EventRegistrationImpl.java
M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M src_moz/DocumentLoaderObserverImpl.cpp
M src_moz/DocumentLoaderObserverImpl.h
M src_moz/EventRegistration.cpp
M src_moz/EventRegistration.h
M src_moz/Makefile.solaris
M src_moz/Makefile.win
M src_moz/NativeEventThread.cpp
M src_moz/NavigationImpl.cpp
M src_moz/RDFTreeNode.cpp
M src_moz/bal_util.cpp
M src_moz/jni_util.cpp
M src_moz/jni_util.h
M src_moz/jni_util_export.cpp
M src_moz/jni_util_export.h



A classes_spec/org/mozilla/webclient/WCMouseEvent.java

 * <P> This java.awt.event.MouseEvent subclass allows the user to access the
 * WebclientEvent.  This eventData of this WebclientEvent, if non-null,
 * is a java.util.Properties instance that contains information about
 * this event.  </P>

 * <P>The following are some interesting keys:</P>

 * <UL>

 * <LI> href
 * </LI>

 * <LI> #text
 * </LI>

 * </UL>

A classes_spec/org/mozilla/webclient/wrapper_native/WCMouseListenerImpl.java

 * This class wraps the user provided instance of
 * java.awt.event.MouseListener so it can be installed as a
 * WebclientEventListener.  Note that we implement MouseListener so we
 * can be detected by the webclient event system.  We don't do anything
 * with these methods here, though.


A src_moz/DOMMouseListenerImpl.cpp

A src_moz/DOMMouseListenerImpl.h

 * This class is the shim between the mozilla listener event system for
 * mouse events and the java MouseListener interface.
 * For each of the Mouse* methods, we call the appropriate method in java.
 * See the implementation of MouseOver for an example.

 * For each mouseEvent, we create a Properties object containing
 * information about the event.  We use methods in dom_util to do this.

A src_moz/dom_util.cpp

A src_moz/dom_util.h

/**

 * Methods to simplify webclient accessing the mozilla DOM.

 */

M classes_spec/org/mozilla/webclient/EventRegistration.java

Added support for java.awt.event.MouseListener

M classes_spec/org/mozilla/webclient/test/EMWindow.java

Implemented simle MouseListener

M classes_spec/org/mozilla/webclient/wrapper_native/EventRegistrationImpl.java

Added support for java.awt.event.MouseListener

M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java

Added support for java.awt.event.MouseListener

M src_moz/DocumentLoaderObserverImpl.cpp
M src_moz/DocumentLoaderObserverImpl.h

 * We define a local IID to allow the addDocumentLoadListener and
 * addMouseListener functions in EventRegistration.{h,cpp} to
 * interrogate the currently installed DocumentLoaderObserver instance
 * in mozilla.

 */

#define NS_IDOCLOADEROBSERVERIMPL_IID_STR "fdadb2e0-3028-11d4-8a96-0080c7b9c5ba"

#define NS_IDOCLOADEROBSERVERIMPL_IID {0xfdadb2e0, 0x3028, 0x11d4, { 0x8a, 0x96, 0x00, 0x80, 0xc7, 0xb9, 0xc5, 0xba }}

/**

 * This class is the shim between the mozilla listener event system for
 * document load events and the java DocumentLoadListener interface.
 * For each of the On* methods, we call the appropriate method in java.
 * See the implementation of OnEndDocumentLoad for an example.

 * A DocumentLoaderObserverImpl instance has a "jobject target", which
 * is the Java object that should ultimately receive the events.  This
 * target will be null if the user just wants to listen for mouse
 * events.  It willl be non-null if the user wants to listen for
 * DocumentLoad events.

 * It also hosts a nsIDOMMouseListener instance, which piggybacks on the
 * nsIDocumentLoaderObserver instance.

M src_moz/EventRegistration.cpp
M src_moz/EventRegistration.h

Add support for MouseListener

M src_moz/Makefile.win

Added classes for MouseListener and Dom access

M src_moz/NativeEventThread.cpp

Added support for MouseListener

M src_moz/NavigationImpl.cpp

Added call to ReleaseStringChars for bal case.

M src_moz/RDFTreeNode.cpp

Added call to ReleaseStringChars for bal case.

M src_moz/bal_util.cpp

Added #include "wchar.h" so this file compiles on Solaris.

M src_moz/jni_util.cpp

Added implementations for util_CreatePropertiesObject,
util_DestroyPropertiesObject and util_StoreIntoPropertiesObject.

M src_moz/jni_util.h

/**

 * A JNI wrapper to create a java.util.Properties object, or the
 * equivalent object in the BAL case.

 */

jobject util_CreatePropertiesObject(JNIEnv *env, jobject reserved_NotUsed);

/**

 * A JNI wrapper to destroy the object from CreatePropertiesObject

 */

void util_DestroyPropertiesObject(JNIEnv *env, jobject propertiesObject,
                                  jobject reserved_NotUsed);

/**

 * A JNI wrapper for storing a name/value pair into the Properties
 * object created by CreatePropertiesObject

 */

void util_StoreIntoPropertiesObject(JNIEnv *env, jobject propertiesObject,
                                    jobject name, jobject value);


M src_moz/jni_util_export.cpp
M src_moz/jni_util_export.h

Added functions for allowing the BAL user to specify functions for
{creating, destroying, setting values into} properties objects.
2000-05-25 23:51:51 +00:00
edburns%acm.org 2cc92f89bd bug 33099
r=shaver
a=edburns

Native code changes: This fix eradicates all
occurrences of the following symbols
 nsComponentManager nsServiceManeger
And replaces them with their nsI counterparts.
The following ns* classes still are used in
webclient, and no plans exist to replace them
with nsI counterparts: nsresult nsCOMPtr
nsCRT nsnull * nsServiceManager occurrences
were replaced with do_GetService(), using a
PROGID. * nsComponentManager occurrences were replaced with a call on the global class gComponentManager, declared in the new file ns_globals.h, and defined in WrapperFactoryImpl.cpp. ns_globals.h is included in jni_util.h. See the attachment to bug 33099 for ns_globals.h * Added deallocation code to WindowControlImpl.cpp nativeTerminate. I know it doesn't do much, but it's correct. Java code changes: * Added static method BrowserControlFactory.appTerminate(). This method simply calls the existing BrowserControlImpl.appTerminate(), which calls WrapperFactoryImpl.cpp nativeTerminate(). BrowserControlFactory.appTerminate() is called from EmbeddedMozilla's WindowListener, which gets fired when the user signals she wants the app to terminate.
2000-04-20 18:16:05 +00:00
edburns%acm.org 383322dfbb bug: http://bugzilla.mozilla.org/show_bug.cgi?id=34665
This change replaces all printfs in src_moz with calls to PR_LOG.  No
printfs should appear in src_moz anymore.

You won't see any console output from native code unless you define

NSPR_LOG_MODULES=webclient:3

in your environment.  Furthermore, if you want PR_LOG statements in
webclient to go to a file instead, define

WEBCLIENT_LOG_FILE=C:\VALIDDIR\filename.txt

in your environment.  This file will get created fresh each time, since
PR_LOG uses fopen(filename, "w").

New Files:

I've created ns_globals.h, included from jni_util.h.  ns_globals.h holds
an extern * to a struct used in the PR_LOG calls.

Significant changes:

WrapperFactoryImpl.cpp

nativeAppInitialize(){

Added:

#if DEBUG_RAPTOR_CANVAS
    prLogModuleInfo = PR_NewLogModule("webclient");
    const char *webclientLogFile = PR_GetEnv("WEBCLIENT_LOG_FILE");
    if (nsnull != webclientLogFile) {
        PR_SetLogFile(webclientLogFile);
        // If this fails, it just goes to stdout/stderr
    }
#endif
}

All the other files in this checkin follow the this pattern:

Before checkin:

       printf("InitMozillaStuff(%lx): Create the Event Queue for the UI thread...\n",
               initContext);

After checkin:

    if (prLogModuleInfo) {
        PR_LOG(prLogModuleInfo, 3,
               ("InitMozillaStuff(%lx): Create the Event Queue for the UI thread...\n",
               initContext));
    }

See http://lxr.mozilla.org/mozilla/source/nsprpub/pr/include/prlog.h#190

for the definition of PR_LOG
2000-04-05 21:38:27 +00:00
edburns%acm.org d7929152b5 bug=32011
r=ashuk
a=edburns
This set of changes replaces all occurrences of

env->Func(args...)

with

::util_Func(env, args...)

Except of course, for the implementations of the above mentioned
::util_Func() functions.

This is done to allow the JNI functions to be called from a non JNI
context, such as UNO.
2000-03-16 23:07:03 +00:00
edburns%acm.org 0d6fc7f850 bug=31123
a=edburns
r=bruce

Folks, don't EVER use NULL in your c++ code.  Use nsnull instead.
2000-03-09 05:12:42 +00:00
edburns%acm.org bb161e49d0 a=edburns
r=ashuk
bug=2069

Native code for spec compliant webclient impl.
2000-03-04 01:37:20 +00:00