Last Comment Bug 47357 - Webclient not ready for multiple native browser implementations.
: Webclient not ready for multiple native browser implementations.
Status: RESOLVED FIXED
:
Product: Core Graveyard
Classification: Graveyard
Component: Java APIs to WebShell (show other bugs)
: Trunk
: x86 Other
: P3 normal (vote)
: ---
Assigned To: edburns
: geetha.vaidyanaathan
Mentors:
Depends on:
Blocks: 33333 49293
  Show dependency treegraph
 
Reported: 2000-08-02 13:44 PDT by edburns
Modified: 2012-04-09 22:27 PDT (History)
0 users
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix for this bug. Untar into a fresh webclient directory. (36.91 KB, application/octet-stream)
2000-08-02 14:44 PDT, edburns
no flags Details
Fix for the re-open of this bug. (20.85 KB, application/octet-stream)
2000-08-10 13:03 PDT, edburns
no flags Details
Diffs for the fix for the re-open (13.93 KB, patch)
2000-08-10 13:04 PDT, edburns
no flags Details | Diff | Splinter Review
diff -u for the second reop of this bug. (20.82 KB, patch)
2000-08-17 00:39 PDT, edburns
no flags Details | Diff | Splinter Review
Patch for second reop (18.37 KB, patch)
2000-08-17 00:40 PDT, edburns
no flags Details | Diff | Splinter Review
tar.gz of changed files for reop. (14.61 KB, application/octet-stream)
2000-08-17 00:41 PDT, edburns
no flags Details

Description edburns 2000-08-02 13:44:59 PDT
need to extract jni_util stuff into separate lib for use in src_moz and src_ie.
Comment 1 edburns 2000-08-02 14:43:31 PDT
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*****

Comment 2 edburns 2000-08-02 14:44:48 PDT
Created attachment 12282 [details]
Fix for this bug.  Untar into a fresh webclient directory.
Comment 3 edburns 2000-08-04 11:15:18 PDT
Checked this in yesterday.
Comment 4 edburns 2000-08-10 11:53:21 PDT
Ashu discovered a problem on the outbound side.  Reopened.
Comment 5 edburns 2000-08-10 13:01:55 PDT
Here's the checkin message for the new fix:

M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M src_moz/CBrowserContainer.cpp
M src_moz/NativeEventThread.cpp
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

tar -cvf 47357.2.tar 
classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java 
src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp 
src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

cvs diff -u 
classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java 
src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp 
src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change modifes what one has to do on the native side to add a
listener.  

 * How to create a new listener type on the native side: <P>

 * 1. add an entry in the gSupportedListenerInterfaces array defined in
 * ns_util.cpp <P>

 * 2. add a corresponding entry in the LISTENER_CLASSES enum in
 * ns_util.h <P>

 * 3. add a jstring to the string constant list in
 * CBrowserContainer.cpp, below.

 * 4. Initialize this jstring constant in CBrowserContainer.cpp
 * initStringConstants() <P>

 * 5. add an entry to the switch statement in NativeEventThread.cpp
 * native{add,remove}Listener <P>

You have to clobber_all in webclient after this change.
Comment 6 edburns 2000-08-10 13:03:33 PDT
Created attachment 12700 [details]
Fix for the re-open of this bug.
Comment 7 edburns 2000-08-10 13:04:55 PDT
Created attachment 12701 [details] [diff] [review]
Diffs for the fix for the re-open
Comment 8 edburns 2000-08-17 00:27:06 PDT
The original abstraction is complete.
Comment 9 edburns 2000-08-17 00:27:38 PDT
Further abstraction is necessary to accomodate listeners.
Comment 10 edburns 2000-08-17 00:37:26 PDT
This would be the checkin message for the fix of the most recent reop of this bug.

Files in this checkin

M src_moz/CBrowserContainer.cpp
M src_moz/CBrowserContainer.h
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

cvs diff -u src_moz/CBrowserContainer.cpp src_moz/CBrowserContainer.h
src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change moves out listener constants and other support data from
src_moz into src_share to enable it to be used in src_ie.

tar -cvf 47357.tar src_moz/CBrowserContainer.cpp src_moz/CBrowserContainer.h
src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h
Comment 11 edburns 2000-08-17 00:39:35 PDT
Created attachment 13032 [details] [diff] [review]
diff -u for the second reop of this bug.
Comment 12 edburns 2000-08-17 00:40:18 PDT
Created attachment 13033 [details] [diff] [review]
Patch for second reop
Comment 13 edburns 2000-08-17 00:41:01 PDT
Created attachment 13034 [details]
tar.gz of changed files for reop.
Comment 14 edburns 2000-08-17 00:42:00 PDT
Added bug 49293 to block list.
Comment 15 edburns 2000-08-17 11:29:46 PDT
Fix checked in.

Note You need to log in before you can comment on or make changes to this bug.