JavaScriptCore:
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Mar 2008 14:34:31 +0000 (14:34 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Mar 2008 14:34:31 +0000 (14:34 +0000)
        Unify concept of enabling the Mac Java bridge.

        Reviewed by Darin and Anders.

        * wtf/Platform.h: Define ENABLE_MAC_JAVA_BRIDGE here.

WebCore:

        Unify concept of enabling the Mac Java bridge.

        Reviewed by Darin and Anders.

        No test cases added since there is no change in functionality.

        * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
        If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
        * WebCore.JNI.exp: Added.
        * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.

        * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
        * bridge/jni/jni_class.h: Ditto.
        * bridge/jni/jni_instance.cpp: Ditto.
        * bridge/jni/jni_instance.h: Ditto.
        * bridge/jni/jni_jsobject.cpp: Ditto.
        * bridge/jni/jni_jsobject.h: Ditto.
        * bridge/jni/jni_objc.mm: Ditto.
        * bridge/jni/jni_runtime.cpp: Ditto.
        * bridge/jni/jni_runtime.h: Ditto.
        * bridge/jni/jni_utility.cpp: Ditto.
        * bridge/jni/jni_utility.h: Ditto.

        * bridge/runtime.cpp: Removed unused #include statements.
        * bridge/runtime.h:
        (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
        guard for JavaLanguage enum.  Also added #if PLATFORM(MAC) guard for
        ObjectiveCLanguage enum to match corresponding code in runtime.cpp.

        * config.h: Removed definition of HAVE_JNI.

        * loader/FrameLoaderClient.h:
        (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
        * page/Frame.cpp:
        (WebCore::Frame::Frame): Ditto.
        * page/Frame.h:
        (WebCore::Frame::initJavaJSBindings): Ditto.
        * page/mac/FrameMac.mm:
        (WebCore::Frame::createScriptInstanceForWidget): Ditto.
        (WebCore::Frame::initJavaJSBindings): Ditto.

WebKit/mac:

        Unify concept of enabling the Mac Java bridge.

        Reviewed by Darin and Anders.

        * Plugins/WebPluginJava.h: Removed unused file.
        * WebCoreSupport/WebFrameLoaderClient.h:
        (WebFrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
        * WebCoreSupport/WebFrameLoaderClient.mm: Ditto for #import and NSView SPI method.
        (WebFrameLoaderClient::javaApplet): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31056 268f45cc-cd09-0410-ab3c-d52691b4dbfc

28 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/wtf/Platform.h
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.JNI.exp [new file with mode: 0644]
WebCore/WebCore.base.exp
WebCore/bridge/jni/jni_class.cpp
WebCore/bridge/jni/jni_class.h
WebCore/bridge/jni/jni_instance.cpp
WebCore/bridge/jni/jni_instance.h
WebCore/bridge/jni/jni_jsobject.cpp
WebCore/bridge/jni/jni_jsobject.h
WebCore/bridge/jni/jni_objc.mm
WebCore/bridge/jni/jni_runtime.cpp
WebCore/bridge/jni/jni_runtime.h
WebCore/bridge/jni/jni_utility.cpp
WebCore/bridge/jni/jni_utility.h
WebCore/bridge/runtime.cpp
WebCore/bridge/runtime.h
WebCore/config.h
WebCore/loader/FrameLoaderClient.h
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/mac/FrameMac.mm
WebKit/mac/ChangeLog
WebKit/mac/Plugins/WebPluginJava.h [deleted file]
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm

index 9bad0b2..12114ea 100644 (file)
@@ -1,3 +1,11 @@
+2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
+
+        Unify concept of enabling the Mac Java bridge.
+
+        Reviewed by Darin and Anders.
+
+        * wtf/Platform.h: Define ENABLE_MAC_JAVA_BRIDGE here.
+
 2008-03-13  Mark Mentovai  <mark@moxienet.com>
 
         Reviewed by eseidel.  Landed by eseidel.
index dfbefca..1bf4e9d 100644 (file)
 #if PLATFORM(MAC)
 #define WTF_PLATFORM_CF 1
 #define WTF_USE_PTHREADS 1
+#define ENABLE_MAC_JAVA_BRIDGE 1
 #endif
 
 #if PLATFORM(MAC) && defined(__LP64__)
 #define ENABLE_FTPDIR 1
 #endif
 
+#if !defined(ENABLE_MAC_JAVA_BRIDGE)
+#define ENABLE_MAC_JAVA_BRIDGE 0
+#endif
+
 #if !defined(ENABLE_NETSCAPE_PLUGIN_API)
 #define ENABLE_NETSCAPE_PLUGIN_API 0
 #endif
index 4a0629a..d6dcde1 100644 (file)
@@ -1,3 +1,46 @@
+2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
+
+        Unify concept of enabling the Mac Java bridge.
+
+        Reviewed by Darin and Anders.
+
+        No test cases added since there is no change in functionality.
+
+        * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
+        If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
+        * WebCore.JNI.exp: Added.
+        * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.
+
+        * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
+        * bridge/jni/jni_class.h: Ditto.
+        * bridge/jni/jni_instance.cpp: Ditto.
+        * bridge/jni/jni_instance.h: Ditto.
+        * bridge/jni/jni_jsobject.cpp: Ditto.
+        * bridge/jni/jni_jsobject.h: Ditto.
+        * bridge/jni/jni_objc.mm: Ditto.
+        * bridge/jni/jni_runtime.cpp: Ditto.
+        * bridge/jni/jni_runtime.h: Ditto.
+        * bridge/jni/jni_utility.cpp: Ditto.
+        * bridge/jni/jni_utility.h: Ditto.
+
+        * bridge/runtime.cpp: Removed unused #include statements.
+        * bridge/runtime.h:
+        (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
+        guard for JavaLanguage enum.  Also added #if PLATFORM(MAC) guard for
+        ObjectiveCLanguage enum to match corresponding code in runtime.cpp.
+
+        * config.h: Removed definition of HAVE_JNI.
+
+        * loader/FrameLoaderClient.h:
+        (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
+        * page/Frame.cpp:
+        (WebCore::Frame::Frame): Ditto.
+        * page/Frame.h:
+        (WebCore::Frame::initJavaJSBindings): Ditto.
+        * page/mac/FrameMac.mm:
+        (WebCore::Frame::createScriptInstanceForWidget): Ditto.
+        (WebCore::Frame::initJavaJSBindings): Ditto.
+
 2008-03-13  Darin Adler  <darin@apple.com>
 
         * html/PreloadScanner.h: Corrected license.
index 0caf39f..240570a 100644 (file)
@@ -601,6 +601,11 @@ CharsetData.cpp : platform/text/mac/make-charset-table.pl platform/text/mac/char
 
 FRAMEWORK_FLAGS = $(shell echo $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
 
+ifeq ($(shell gcc -E -P -dM -F $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_MAC_JAVA_BRIDGE | cut -d' ' -f3), 1)
+    WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.JNI.exp
+endif
+
+# See also "Generate 64-bit Export File" build phase script in WebCore.xcodeproj/project.pbxproj
 ifeq ($(shell gcc -E -P -dM -F $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_NETSCAPE_PLUGIN_API | cut -d' ' -f3), 1)
     WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.NPAPI.exp
 endif
diff --git a/WebCore/WebCore.JNI.exp b/WebCore/WebCore.JNI.exp
new file mode 100644 (file)
index 0000000..d57b8c7
--- /dev/null
@@ -0,0 +1,10 @@
+_KJS_JSCreateNativeJSObject
+_KJS_JSObject_JSFinalize
+_KJS_JSObject_JSObjectCall
+_KJS_JSObject_JSObjectEval
+_KJS_JSObject_JSObjectGetMember
+_KJS_JSObject_JSObjectGetSlot
+_KJS_JSObject_JSObjectRemoveMember
+_KJS_JSObject_JSObjectSetMember
+_KJS_JSObject_JSObjectSetSlot
+_KJS_JSObject_JSObjectToString
index 5e74656..a60621d 100644 (file)
@@ -115,16 +115,6 @@ _DOMEventException
 _DOMException
 _DOMRangeException
 _DOMXPathException
-_KJS_JSCreateNativeJSObject
-_KJS_JSObject_JSFinalize
-_KJS_JSObject_JSObjectCall
-_KJS_JSObject_JSObjectEval
-_KJS_JSObject_JSObjectGetMember
-_KJS_JSObject_JSObjectGetSlot
-_KJS_JSObject_JSObjectRemoveMember
-_KJS_JSObject_JSObjectSetMember
-_KJS_JSObject_JSObjectSetSlot
-_KJS_JSObject_JSObjectToString
 _WebCoreDrawTextAtPoint
 _WebCoreFindFont
 _WebCoreObjCFinalizeOnMainThread
index 23750e7..625a683 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+
 #include "config.h"
 #include "jni_class.h"
 
+#if ENABLE(MAC_JAVA_BRIDGE)
+
 #include <kjs/identifier.h>
 #include "jni_utility.h"
 #include "jni_runtime.h"
@@ -132,3 +135,5 @@ bool JavaClass::isStringClass() const
 {
     return strcmp(_name, "java.lang.String") == 0;
 }
+
+#endif // ENABLE(MAC_JAVA_BRIDGE)
index 7c5dbcc..bc4baf1 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef JNI_CLASS_H_
 #define JNI_CLASS_H_
 
+#if ENABLE(MAC_JAVA_BRIDGE)
+
 #include <jni_runtime.h>
 #include <wtf/HashMap.h>
 
@@ -59,4 +61,6 @@ private:
 
 } // namespace KJS
 
+#endif // ENABLE(MAC_JAVA_BRIDGE)
+
 #endif // JNI_CLASS_H_
index 34d587d..db1847c 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+
 #include "config.h"
+#include "jni_instance.h"
+
+#if ENABLE(MAC_JAVA_BRIDGE)
 
 #include "jni_class.h"
-#include "jni_instance.h"
 #include "jni_runtime.h"
 #include "jni_utility.h"
 #include "runtime_object.h"
@@ -331,3 +334,5 @@ JObjectWrapper::~JObjectWrapper() {
     JS_LOG ("deleting global ref %p\n", _instance);
     _env->DeleteGlobalRef (_instance);
 }
+
+#endif // ENABLE(MAC_JAVA_BRIDGE)
index 224eccd..cf8864f 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+
 #ifndef _JNI_INSTANCE_H_
 #define _JNI_INSTANCE_H_
 
+#if ENABLE(MAC_JAVA_BRIDGE)
+
 #include "runtime.h"
 #include "runtime_root.h"
 
@@ -101,4 +104,6 @@ private:
 
 } // namespace KJS
 
-#endif
+#endif // ENABLE(MAC_JAVA_BRIDGE)
+
+#endif // _JNI_INSTANCE_H_
index a30d6d3..75991e6 100644 (file)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "jni_jsobject.h"
 
+#if ENABLE(MAC_JAVA_BRIDGE)
+
 #include "Frame.h"
 #include "WebCoreFrameView.h"
 #include "jni_runtime.h"
@@ -713,3 +715,5 @@ jstring KJS_JSObject_JSObjectToString (JNIEnv*, jclass, jlong nativeHandle)
 }
 
 }
+
+#endif // ENABLE(MAC_JAVA_BRIDGE)
index 3a0df07..754e362 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef JAVASCRIPTCORE_BINDINGS_JNI_JSOBJECT_H
 #define JAVASCRIPTCORE_BINDINGS_JNI_JSOBJECT_H
 
+#if ENABLE(MAC_JAVA_BRIDGE)
+
 #include <CoreFoundation/CoreFoundation.h>
 
 #include <JavaVM/jni.h>
@@ -122,4 +124,6 @@ jstring KJS_JSObject_JSObjectToString(JNIEnv*, jclass, jlong nativeJSObject);
 
 }
 
-#endif
+#endif // ENABLE(MAC_JAVA_BRIDGE)
+
+#endif // JAVASCRIPTCORE_BINDINGS_JNI_JSOBJECT_H
index a23494b..3c7c0ec 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+
 #include "config.h"
+
+#if ENABLE(MAC_JAVA_BRIDGE)
+
 #import <Foundation/Foundation.h>
 #import "jni_utility.h"
 #import "objc_utility.h"
@@ -74,3 +78,5 @@ bool KJS::Bindings::dispatchJNICall (const void *targetAppletView, jobject obj,
     bzero (&result, sizeof(jvalue));
     return false;
 }
+
+#endif // ENABLE(MAC_JAVA_BRIDGE)
index e4038b4..e9aa80f 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+
 #include "config.h"
+#include <jni_runtime.h>
+
+#if ENABLE(MAC_JAVA_BRIDGE)
 
 #include <jni_utility.h>
-#include <jni_runtime.h>
 
 #include "runtime_array.h"
 #include "runtime_object.h"
@@ -539,4 +542,4 @@ unsigned int JavaArray::getLength() const
     return _length;
 }
 
-
+#endif // ENABLE(MAC_JAVA_BRIDGE)
index 9ea1371..3d6b742 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+
 #ifndef _JNI_RUNTIME_H_
 #define _JNI_RUNTIME_H_
 
+#if ENABLE(MAC_JAVA_BRIDGE)
+
 #include <jni_utility.h>
 #include <jni_instance.h>
 
@@ -182,4 +185,6 @@ private:
 
 } // namespace KJS
 
-#endif
+#endif // ENABLE(MAC_JAVA_BRIDGE)
+
+#endif // _JNI_RUNTIME_H_
index e8d599b..d84901c 100644 (file)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "jni_utility.h"
 
+#if ENABLE(MAC_JAVA_BRIDGE)
+
 #include "jni_runtime.h"
 #include "runtime_array.h"
 #include "runtime_object.h"
@@ -580,3 +582,5 @@ jvalue convertValueToJValue (ExecState *exec, JSValue *value, JNIType _JNIType,
 }  // end of namespace Bindings
 
 } // end of namespace KJS
+
+#endif // ENABLE(MAC_JAVA_BRIDGE)
index 6807e3f..8ef28de 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+
 #ifndef _JNI_UTILITY_H_
 #define _JNI_UTILITY_H_
 
+#if ENABLE(MAC_JAVA_BRIDGE)
+
 #include <JavaVM/jni.h>
 
 // The order of these items can not be modified as they are tightly
@@ -280,4 +283,6 @@ bool dispatchJNICall(const void *targetAppletView, jobject obj, bool isStatic, J
 
 } // namespace KJS
 
+#endif // ENABLE(MAC_JAVA_BRIDGE)
+
 #endif // _JNI_UTILITY_H_
index 2a590f3..5abcc6e 100644 (file)
 #include "config.h"
 #include "runtime.h"
 
-#include "NP_jsobject.h"
-#include "c_instance.h"
 #include "runtime_object.h"
 #include "runtime_root.h"
 
-#if HAVE(JNI)
-#include "jni_instance.h"
-#endif
-#if PLATFORM(MAC)
-#include "objc_instance.h"
-#endif
 #if PLATFORM(QT)
 #include "qt_instance.h"
 #endif
index b4eabaf..8df88bc 100644 (file)
@@ -86,8 +86,12 @@ typedef void (*KJSDidExecuteFunctionPtr)(ExecState*, JSObject* rootObject);
 class Instance : public RefCounted<Instance> {
 public:
     typedef enum {
+#if ENABLE(MAC_JAVA_BRIDGE)
         JavaLanguage,
+#endif
+#if PLATFORM(MAC)
         ObjectiveCLanguage,
+#endif
         CLanguage
 #if PLATFORM(QT)
         , QtLanguage
index a0cde5d..11b1e06 100644 (file)
 
 #if PLATFORM(MAC)
 #define WTF_USE_JAVASCRIPTCORE_BINDINGS 1
-#define HAVE_JNI 1
 #endif
 
 #if PLATFORM(SYMBIAN)
index e6ee5bb..8fc539a 100644 (file)
@@ -210,7 +210,9 @@ namespace WebCore {
         virtual void registerForIconNotification(bool listen = true) = 0;
         
 #if PLATFORM(MAC)
+#if ENABLE(MAC_JAVA_BRIDGE)
         virtual jobject javaApplet(NSView*) { return 0; }
+#endif
         virtual NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long identifier, NSCachedURLResponse*) const = 0;
 #endif
     };
index f28bd2e..b48ce3c 100644 (file)
@@ -136,7 +136,7 @@ Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient*
 
     XMLNames::init();
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && ENABLE(MAC_JAVA_BRIDGE)
     static bool initializedJavaJSBindings;
     if (!initializedJavaJSBindings) {
         initializedJavaJSBindings = true;
index faab759..42c2dc5 100644 (file)
@@ -169,7 +169,9 @@ public:
     PassRefPtr<KJS::Bindings::RootObject> createRootObject(void* nativeHandle, KJS::JSGlobalObject*);
 
 #if PLATFORM(MAC)
+#if ENABLE(MAC_JAVA_BRIDGE)
     static void initJavaJSBindings();
+#endif
     WebScriptObject* windowScriptObject();
 #endif
 
index a8755e1..611a9ba 100644 (file)
@@ -99,7 +99,9 @@
 #import "objc_instance.h"
 #import "runtime_root.h"
 #import "runtime.h"
+#if ENABLE(MAC_JAVA_BRIDGE)
 #import "jni_instance.h"
+#endif
 
 @interface NSObject (WebPlugin)
 - (id)objectForWebScript;
@@ -576,10 +578,14 @@ PassRefPtr<KJS::Bindings::Instance> Frame::createScriptInstanceForWidget(Widget*
 #endif
     }
 
+#if ENABLE(MAC_JAVA_BRIDGE)
     jobject applet = loader()->client()->javaApplet(widgetView);
     if (!applet)
         return 0;
     return KJS::Bindings::JavaInstance::create(applet, rootObject.release());
+#else
+    return 0;
+#endif
 }
 
 WebScriptObject* Frame::windowScriptObject()
@@ -646,11 +652,13 @@ static void updateRenderingForBindings(KJS::ExecState* exec, KJS::JSObject* root
     document->updateRendering();
 }
 
+#if ENABLE(MAC_JAVA_BRIDGE)
 void Frame::initJavaJSBindings()
 {
     mainThread = pthread_self();
     KJS::Bindings::JavaJSObject::initializeJNIThreading();
     KJS::Bindings::Instance::setDidExecuteFunction(updateRenderingForBindings);
 }
+#endif
 
 } // namespace WebCore
index d5928af..4214681 100644 (file)
@@ -1,3 +1,15 @@
+2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
+
+        Unify concept of enabling the Mac Java bridge.
+
+        Reviewed by Darin and Anders.
+
+        * Plugins/WebPluginJava.h: Removed unused file.
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        (WebFrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
+        * WebCoreSupport/WebFrameLoaderClient.mm: Ditto for #import and NSView SPI method.
+        (WebFrameLoaderClient::javaApplet): Ditto.
+
 2008-03-13  Antti Koivisto  <antti@apple.com>
 
         Reviewed by Darin.
diff --git a/WebKit/mac/Plugins/WebPluginJava.h b/WebKit/mac/Plugins/WebPluginJava.h
deleted file mode 100644 (file)
index 8015dba..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2004 Apple Computer, Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <JavaVM/JavaVM.h>
-
-// The WebPluginContainer will call these methods for LiveConnect support. The
-//  WebPluginContainer should see if the WebPlugin supports these methods before
-//  calling them.
-
-@protocol WebPluginJava <NSObject>
-
-// This returns the jobject representing the java applet to the WebPluginContainer.
-//  It should always be called from the AppKit Main Thread.
-- (jobject) getApplet;
-
-// This will call the given method on the given jobject with the given arguments
-//  from the proper thread for this WebPlugin. This way, no java applet code will
-//  be run on the AppKit Main Thread, it will be called on a thread belonging to the
-//  java applet.
-//  It should always be called from the AppKit Main Thread.
-- (jvalue) callJavaOn:(jobject)object withMethod:(jmethodID) withArgs:(jvalue*)args;
-
-@end
index 6b0cb48..c769cc8 100644 (file)
@@ -198,7 +198,9 @@ private:
 
     virtual void registerForIconNotification(bool listen);
 
+#if ENABLE(MAC_JAVA_BRIDGE)
     virtual jobject javaApplet(NSView*);
+#endif
 
     void deliverArchivedResourcesAfterDelay() const;
     void deliverArchivedResources(WebCore::Timer<WebFrameLoaderClient>*);
index e6012a6..a1709e5 100644 (file)
@@ -52,7 +52,9 @@
 #import "WebHistoryItemInternal.h"
 #import "WebHistoryInternal.h"
 #import "WebIconDatabaseInternal.h"
+#if ENABLE(MAC_JAVA_BRIDGE)
 #import "WebJavaPlugIn.h"
+#endif
 #import "WebKitErrorsPrivate.h"
 #import "WebKitLogging.h"
 #import "WebKitNSStringExtras.h"
 
 using namespace WebCore;
 
+#if ENABLE(MAC_JAVA_BRIDGE)
 @interface NSView (WebJavaPluginDetails)
 - (jobject)pollForAppletInWindow:(NSWindow *)window;
 @end
+#endif
 
 // Needed for <rdar://problem/5121850> 
 @interface NSURLDownload (WebNSURLDownloadDetails)
@@ -1506,6 +1510,7 @@ void WebFrameLoaderClient::didPerformFirstNavigation() const
         [preferences setCacheModel:WebCacheModelDocumentBrowser];
 }
 
+#if ENABLE(MAC_JAVA_BRIDGE)
 jobject WebFrameLoaderClient::javaApplet(NSView* view)
 {
     if ([view respondsToSelector:@selector(webPlugInGetApplet)])
@@ -1518,6 +1523,7 @@ jobject WebFrameLoaderClient::javaApplet(NSView* view)
 
     return 0;
 }
+#endif
 
 @implementation WebFramePolicyListener