diff options
author | Steve Block <steveblock@google.com> | 2010-08-27 11:02:25 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-02 17:17:20 +0100 |
commit | e8b154fd68f9b33be40a3590e58347f353835f5c (patch) | |
tree | 0733ce26384183245aaa5656af26c653636fe6c1 /WebKit/gtk/webkit/webkitprivate.cpp | |
parent | da56157816334089526a7a115a85fd85a6e9a1dc (diff) | |
download | external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.zip external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.gz external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.bz2 |
Merge WebKit at r66079 : Initial merge by git
Change-Id: Ie2e1440fb9d487d24e52c247342c076fecaecac7
Diffstat (limited to 'WebKit/gtk/webkit/webkitprivate.cpp')
-rw-r--r-- | WebKit/gtk/webkit/webkitprivate.cpp | 42 |
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 +} + |