view modules/web/src/main/native/Source/WebCore/platform/java/BridgeUtils.h @ 5976:94331ac42150

RT-25869: Update copyright year in header of modified source code files to 2013 Reviewed-by: Mong Hang Vo
author kcr
date Mon, 23 Dec 2013 13:46:39 -0800
parents 8cbaf9096cda
line wrap: on
line source
 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
#ifndef BridgeUtils_h
#define BridgeUtils_h

#include "JNIUtility.h"
#include "ScriptController.h"
#include <JavaScriptCore/API/JSValue.h>
#include <JavaScriptCore/JSObjectRef.h>

namespace WebCore {
    /* Returns a local reference to a fresh Java String. */
    jstring JSValue_to_Java_String(JSValueRef value, JNIEnv* env, JSContextRef ctx);
    jobject JSValue_to_Java_Object(JSValueRef value, JNIEnv* env, JSContextRef ctx, JSC::Bindings::RootObject* rootPeer);
    JSValueRef Java_Object_to_JSValue(JNIEnv *env, JSContextRef ctx, JSC::Bindings::RootObject* rootObject, jobject val, jobject accessControlContext);
    JSStringRef asJSStringRef(JNIEnv *env, jstring str);
    JSGlobalContextRef getGlobalContext(WebCore::ScriptController* sc);
    jobject executeScript(JNIEnv* env,
                          JSObjectRef object,
                          JSContextRef ctx,
                          JSC::Bindings::RootObject* rootPeer,
                          jstring script);

#endif // BridgeUtils_h