forked from chromiumembedded/java-cef
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCefWebPluginManager_N.cpp
More file actions
61 lines (53 loc) · 1.77 KB
/
Copy pathCefWebPluginManager_N.cpp
File metadata and controls
61 lines (53 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include "CefWebPluginManager_N.h"
#include "jni_util.h"
#include "web_plugin_unstable_callback.h"
#include "web_plugin_visitor.h"
#include "include/cef_web_plugin.h"
JNIEXPORT void JNICALL
Java_org_cef_network_CefWebPluginManager_1N_N_1VisitPlugins(JNIEnv* env,
jobject,
jobject jvisitor) {
if (!jvisitor)
return;
CefRefPtr<CefWebPluginInfoVisitor> visitor =
new WebPluginInfoVisitor(env, jvisitor);
CefVisitWebPluginInfo(visitor);
}
JNIEXPORT void JNICALL
Java_org_cef_network_CefWebPluginManager_1N_N_1RefreshPlugins(JNIEnv*,
jobject) {
CefRefreshWebPlugins();
}
JNIEXPORT void JNICALL
Java_org_cef_network_CefWebPluginManager_1N_N_1UnregisterInternalPlugin(
JNIEnv* env,
jobject obj,
jstring jpath) {
if (!jpath)
return;
CefUnregisterInternalWebPlugin(GetJNIString(env, jpath));
}
JNIEXPORT void JNICALL
Java_org_cef_network_CefWebPluginManager_1N_N_1RegisterPluginCrash(
JNIEnv* env,
jobject obj,
jstring jpath) {
if (!jpath)
return;
CefRegisterWebPluginCrash(GetJNIString(env, jpath));
}
JNIEXPORT void JNICALL
Java_org_cef_network_CefWebPluginManager_1N_N_1IsWebPluginUnstable(
JNIEnv* env,
jobject obj,
jstring jpath,
jobject jcallback) {
if (!jpath || !jcallback)
return;
CefRefPtr<CefWebPluginUnstableCallback> callback =
new WebPluginUnstableCallback(env, jcallback);
CefIsWebPluginUnstable(GetJNIString(env, jpath), callback);
}