summaryrefslogtreecommitdiffstats
path: root/WebKit/android/plugins
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2009-06-29 13:46:51 -0400
committerDerek Sollenberger <djsollen@google.com>2009-06-29 13:46:51 -0400
commit5c6846a9fb474dce40db8859579e0d6a3f802787 (patch)
treecec8e36b466f125f9c7ff364c140b8d71300e884 /WebKit/android/plugins
parent9ef86237529ed76780c62ff0e49c8a0a85a6562c (diff)
downloadexternal_webkit-5c6846a9fb474dce40db8859579e0d6a3f802787.zip
external_webkit-5c6846a9fb474dce40db8859579e0d6a3f802787.tar.gz
external_webkit-5c6846a9fb474dce40db8859579e0d6a3f802787.tar.bz2
Adding support for plugins to request the keyboard.
Diffstat (limited to 'WebKit/android/plugins')
-rw-r--r--WebKit/android/plugins/ANPWindowInterface.cpp7
-rw-r--r--WebKit/android/plugins/android_npapi.h6
2 files changed, 13 insertions, 0 deletions
diff --git a/WebKit/android/plugins/ANPWindowInterface.cpp b/WebKit/android/plugins/ANPWindowInterface.cpp
index 8258936..7773e6e 100644
--- a/WebKit/android/plugins/ANPWindowInterface.cpp
+++ b/WebKit/android/plugins/ANPWindowInterface.cpp
@@ -63,6 +63,12 @@ static void anp_scrollTo(NPP instance, int32_t x, int32_t y) {
core->scrollTo(x,y,true);
}
+static void anp_showKeyboard(NPP instance, bool value) {
+ ScrollView* scrollView = pluginViewForInstance(instance)->parent();
+ android::WebViewCore* core = android::WebViewCore::getWebViewCore(scrollView);
+ core->requestKeyboard(value);
+}
+
///////////////////////////////////////////////////////////////////////////////
#define ASSIGN(obj, name) (obj)->name = anp_##name
@@ -73,6 +79,7 @@ void ANPWindowInterfaceV0_Init(ANPInterface* value) {
ASSIGN(i, lockRect);
ASSIGN(i, lockRegion);
ASSIGN(i, scrollTo);
+ ASSIGN(i, showKeyboard);
ASSIGN(i, unlock);
}
diff --git a/WebKit/android/plugins/android_npapi.h b/WebKit/android/plugins/android_npapi.h
index c11d448..daae138 100644
--- a/WebKit/android/plugins/android_npapi.h
+++ b/WebKit/android/plugins/android_npapi.h
@@ -614,6 +614,12 @@ struct ANPWindowInterfaceV0 : ANPInterface {
closely aligned to the coordinates as possible.
*/
void (*scrollTo)(NPP instance, int32_t x, int32_t y);
+ /** Given a boolean value of true the device will be requested to provide
+ a keyboard. A value of false will result in a request to hide the
+ keyboard. Further, the on-screen keyboard will not be displayed if a
+ physical keyboard is active.
+ */
+ void (*showKeyboard)(NPP instance, bool value);
};
///////////////////////////////////////////////////////////////////////////////