This checkin refactors who owns the nativeWebShell pointer. It used to
be WindowControl, and now it's BrowserControl. I'm hoping this allows
us to operate Webclient in a "headless" fashion. For example, you can
imagine a web-crawler app that leverages DOM.
A test/automated/src/test/NavigationTest.txt
- fodder for testcase
M build-tests.xml
- reformat
- add NavigationTest (fails)
M classes_spec/org/mozilla/webclient/ImplObject.java
- Refactoring: remove public ivars. Make them private, provide
accessor.
M classes_spec/org/mozilla/webclient/impl/wrapper_native/ImplObjectNative.java
- Refactoring: remove public ivars. Make them private, provide
accessor.
- Remove dependence on WindowControl
- leverage new method on WrapperFactory: getNativeBrowserControl().
M classes_spec/org/mozilla/webclient/impl/BrowserControlImpl.java
- Make BrowserControlImpl the owner of the nativeWebShell pointer. I'd
like to see if it's possible for webclient to operate "headless" for
certain applications, therefore, you may not have a WindowControl
instance, which used to own the nativeWebShell pointer.
M classes_spec/org/mozilla/webclient/impl/WrapperFactory.java
- reformatting
- Software Practice: avoid downcasting to implementation class. Since BrowserControlImpl is the owner of the nativeWebShell, but there
is no mention of that in the public API, we modify the WrapperFactory
contract to maintain a data structure of BrowserControl to
nativeWebShell mappings.
- add native{Create,Destroy}BrowserControl(), which is called from
ImplObjectNative.
M classes_spec/org/mozilla/webclient/impl/wrapper_native/BookmarksImpl.java
M classes_spec/org/mozilla/webclient/impl/wrapper_native/CurrentPageImpl.java
M classes_spec/org/mozilla/webclient/impl/wrapper_native/EventRegistrationImpl.java
M classes_spec/org/mozilla/webclient/impl/wrapper_native/HistoryImpl.java
M classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java
- refactoring for removing public ivars.
M classes_spec/org/mozilla/webclient/impl/wrapper_native/WindowControlImpl.java
- refactoring for removing public ivars.
- comment out nativeCreateInitContext temporarily
M classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java
- implement new methods:
- add native{Create,Destroy}BrowserControl(), which is called from
ImplObjectNative.
M classes_spec/org/mozilla/webclient/wrapper_nonnative/WrapperFactoryImpl.java
- remove vertigo test
M src_moz/ProfileManagerImpl.cpp
- shutdown the current profile
M src_moz/WrapperFactoryImpl.cpp
- Spinup and Spindown the Appshell
A test/automated/src/classes/org/mozilla/webclient/NavigationTest.java
- new test
M test/automated/src/test/BrowserControlFactoryTest_correct
- new test content
git-svn-id: svn://10.0.0.236/trunk@153571 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -180,10 +180,6 @@ Java_org_mozilla_webclient_impl_wrapper_1native_WrapperFactoryImpl_nativeAppSetu
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/************* PENDING(edburns): fix this when someone replies to my
|
||||
* 20030915 post to n.p.m.embedding
|
||||
|
||||
// appshell
|
||||
// XXX startup appshell service?
|
||||
// XXX create offscreen window for appshell service?
|
||||
@@ -218,8 +214,6 @@ Java_org_mozilla_webclient_impl_wrapper_1native_WrapperFactoryImpl_nativeAppSetu
|
||||
"Failed to Spinup AppShell");
|
||||
return;
|
||||
}
|
||||
****/
|
||||
|
||||
|
||||
PR_LOG(prLogModuleInfo, PR_LOG_DEBUG,
|
||||
("WrapperFactoryImpl_nativeAppSetup: exiting\n"));
|
||||
@@ -238,12 +232,15 @@ Java_org_mozilla_webclient_impl_wrapper_1native_WrapperFactoryImpl_nativeTermina
|
||||
|
||||
PR_ASSERT(wcContext);
|
||||
|
||||
/********* PENDING(edburns): fix this when the above appshell logic
|
||||
is fixed
|
||||
if (wcContext->sAppShell) {
|
||||
rv = wcContext->sAppShell->Spindown();
|
||||
PR_LOG(prLogModuleInfo, PR_LOG_DEBUG,
|
||||
("WrapperFactoryImpl_nativeTerminate: Spindown rv: %d\n",
|
||||
rv));
|
||||
|
||||
NS_RELEASE(wcContext->sAppShell);
|
||||
wcContext->sAppShell = nsnull;
|
||||
***/
|
||||
NS_RELEASE(wcContext->sAppShell);
|
||||
wcContext->sAppShell = nsnull;
|
||||
}
|
||||
PR_ASSERT(nsnull == wcContext->sProfile);
|
||||
PR_ASSERT(nsnull == wcContext->sProfileInternal);
|
||||
|
||||
@@ -294,3 +291,13 @@ Java_org_mozilla_webclient_impl_wrapper_1native_WrapperFactoryImpl_nativeDoesImp
|
||||
return result;
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WrapperFactoryImpl_nativeCreateBrowserControl
|
||||
(JNIEnv *env, jobject obj, jint nativeContext) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_WrapperFactoryImpl_nativeDestroyBrowserControl
|
||||
(JNIEnv *env, jobject obj, jint nativeContext, jint nativeBrowserControl) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user