17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 static Page* getPage(jlong jpage)
23 {
24 return WebPage::pageFromJLong(jpage);
25 }
26
27 static BackForwardList* getBfl(jlong jpage)
28 {
29 return static_cast<WebCore::BackForwardList*>(getPage(jpage)->backForward().client());
30 }
31
32 static HistoryItem* getItem(jlong jitem)
33 {
34 return static_cast<HistoryItem*>(jlong_to_ptr(jitem));
35 }
36
37 static jmethodID initMethod(JNIEnv* env, jclass cls, char* name, const char* signature)
38 {
39 jmethodID mid = env->GetMethodID(cls, name, signature);
40 ASSERT(mid);
41 return mid;
42 }
43
44 static jmethodID initCtor(JNIEnv* env, jclass cls, const char* signature)
45 {
46 return initMethod(env, cls, "<init>", signature);
47 }
48
49 // ENTRY-RELATED METHODS
50
51 static jclass getJEntryClass()
52 {
53 JNIEnv* env = WebCore_GetJavaEnv();
54
55 static JGClass jEntryClass(env->FindClass("com/sun/webkit/BackForwardList$Entry"));
56 ASSERT(jEntryClass);
57
|
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 static Page* getPage(jlong jpage)
23 {
24 return WebPage::pageFromJLong(jpage);
25 }
26
27 static BackForwardList* getBfl(jlong jpage)
28 {
29 return static_cast<WebCore::BackForwardList*>(getPage(jpage)->backForward().client());
30 }
31
32 static HistoryItem* getItem(jlong jitem)
33 {
34 return static_cast<HistoryItem*>(jlong_to_ptr(jitem));
35 }
36
37 static jmethodID initMethod(JNIEnv* env, jclass cls, const char* name, const char* signature)
38 {
39 jmethodID mid = env->GetMethodID(cls, name, signature);
40 ASSERT(mid);
41 return mid;
42 }
43
44 static jmethodID initCtor(JNIEnv* env, jclass cls, const char* signature)
45 {
46 return initMethod(env, cls, "<init>", signature);
47 }
48
49 // ENTRY-RELATED METHODS
50
51 static jclass getJEntryClass()
52 {
53 JNIEnv* env = WebCore_GetJavaEnv();
54
55 static JGClass jEntryClass(env->FindClass("com/sun/webkit/BackForwardList$Entry"));
56 ASSERT(jEntryClass);
57
|