summaryrefslogtreecommitdiffstats
path: root/WebKit/gtk/webkit/webkitprivate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/gtk/webkit/webkitprivate.cpp')
-rw-r--r--WebKit/gtk/webkit/webkitprivate.cpp42
1 files changed, 36 insertions, 6 deletions
diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp
index 91b2904..1b7f7a3 100644
--- a/WebKit/gtk/webkit/webkitprivate.cpp
+++ b/WebKit/gtk/webkit/webkitprivate.cpp
@@ -28,6 +28,8 @@
#include "FrameLoader.h"
#include "FrameLoaderClientGtk.h"
#include "GtkVersioning.h"
+#include "HTMLMediaElement.h"
+#include "HTMLNames.h"
#include "HitTestResult.h"
#include "IconDatabase.h"
#include "Logging.h"
@@ -50,6 +52,10 @@
#include <stdlib.h>
#include <wtf/Threading.h>
+#if ENABLE(VIDEO)
+#include "FullscreenVideoController.h"
+#endif
+
#if ENABLE(DATABASE)
#include "DatabaseTracker.h"
#endif
@@ -278,12 +284,6 @@ void webkit_init()
// FIXME: Expose this with an API and/or calculate based on available resources
webkit_set_cache_model(WEBKIT_CACHE_MODEL_WEB_BROWSER);
-#ifdef HAVE_GSETTINGS
- // Initialize settings variables here to make sure this happens in
- // the main thread.
- inspectorGSettings();
-#endif
-
#if ENABLE(DATABASE)
gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL);
webkit_set_web_database_directory_path(databaseDirectory);
@@ -327,3 +327,33 @@ void webkit_reset_origin_access_white_lists()
{
SecurityOrigin::resetOriginAccessWhitelists();
}
+
+
+void webkitWebViewEnterFullscreen(WebKitWebView* webView, Node* node)
+{
+ if (!node->hasTagName(HTMLNames::videoTag))
+ return;
+
+#if ENABLE(VIDEO)
+ HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
+ WebKitWebViewPrivate* priv = webView->priv;
+
+ // First exit Fullscreen for the old mediaElement.
+ if (priv->fullscreenVideoController)
+ priv->fullscreenVideoController->exitFullscreen();
+
+ priv->fullscreenVideoController = new FullscreenVideoController;
+ priv->fullscreenVideoController->setMediaElement(videoElement);
+ priv->fullscreenVideoController->enterFullscreen();
+#endif
+}
+
+void webkitWebViewExitFullscreen(WebKitWebView* webView)
+{
+#if ENABLE(VIDEO)
+ WebKitWebViewPrivate* priv = webView->priv;
+ if (priv->fullscreenVideoController)
+ priv->fullscreenVideoController->exitFullscreen();
+#endif
+}
+