summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/plugins/ANPWindowInterface.cpp
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2011-06-01 13:57:34 -0400
committerDerek Sollenberger <djsollen@google.com>2011-06-02 09:43:52 -0400
commitefe71a4f8c22057f6b18aca6c3cd46769d23468c (patch)
tree5cfb3bf21c3097d2cceaca1b0f985ab1cceb3b23 /Source/WebKit/android/plugins/ANPWindowInterface.cpp
parentb4d178df818e8b6e7a1cfbb0e34bbf7bb9d74ec9 (diff)
downloadexternal_webkit-efe71a4f8c22057f6b18aca6c3cd46769d23468c.zip
external_webkit-efe71a4f8c22057f6b18aca6c3cd46769d23468c.tar.gz
external_webkit-efe71a4f8c22057f6b18aca6c3cd46769d23468c.tar.bz2
Add API to allow plugins to lock their orientation in full-screen mode.
This CL has companion changes in the framework and browser. bug: 3398386 Change-Id: I3427e61e47b66f4142581fb043eeebc613d71b51
Diffstat (limited to 'Source/WebKit/android/plugins/ANPWindowInterface.cpp')
-rw-r--r--Source/WebKit/android/plugins/ANPWindowInterface.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/WebKit/android/plugins/ANPWindowInterface.cpp b/Source/WebKit/android/plugins/ANPWindowInterface.cpp
index a74616c..cac8f8c 100644
--- a/Source/WebKit/android/plugins/ANPWindowInterface.cpp
+++ b/Source/WebKit/android/plugins/ANPWindowInterface.cpp
@@ -79,6 +79,12 @@ static ANPRectI anp_visibleRect(NPP instance) {
return pluginWidget->visibleRect();
}
+static void anp_requestFullScreenOrientation(NPP instance, ANPScreenOrientation orientation) {
+ PluginView* pluginView = pluginViewForInstance(instance);
+ PluginWidgetAndroid* pluginWidget = pluginView->platformPluginWidget();
+ pluginWidget->setFullScreenOrientation(orientation);
+}
+
///////////////////////////////////////////////////////////////////////////////
#define ASSIGN(obj, name) (obj)->name = anp_##name
@@ -101,3 +107,11 @@ void ANPWindowInterfaceV1_Init(ANPInterface* value) {
ANPWindowInterfaceV1* i = reinterpret_cast<ANPWindowInterfaceV1*>(value);
ASSIGN(i, visibleRect);
}
+
+void ANPWindowInterfaceV2_Init(ANPInterface* value) {
+ // initialize the functions from the previous interface
+ ANPWindowInterfaceV1_Init(value);
+ // add any new functions or override existing functions
+ ANPWindowInterfaceV2* i = reinterpret_cast<ANPWindowInterfaceV2*>(value);
+ ASSIGN(i, requestFullScreenOrientation);
+}