summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-09-07 16:06:06 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-10-19 08:38:01 +0000
commit0e9555838c83ccf5a6a28ee99d6fd556ebf5b3b2 (patch)
tree3b1709a0e5cfb6ba76f7d532fbd2dfac85393068 /src/core/web_contents_delegate_qt.cpp
parent38a426f21c0d6e47bdc05e5541b79c48cf967a0c (diff)
Fix ABI breakage due to fullscreen feature
We can not add a new virtual method without breaking ABI on some platforms, instead we need to use a setter. The API now uses a request object, and a separate signal for canceling, since canceling can not be rejected. Change-Id: If8069c343e86926293c30e8de179bf4e3cbd5886 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 497910a9c..1f789161a 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -245,24 +245,21 @@ content::JavaScriptDialogManager *WebContentsDelegateQt::GetJavaScriptDialogMana
void WebContentsDelegateQt::EnterFullscreenModeForTab(content::WebContents *web_contents, const GURL& origin)
{
- Q_UNUSED(origin); // FIXME
- if (!m_viewClient->isFullScreen()) {
- m_viewClient->requestFullScreen(true);
- web_contents->GetRenderViewHost()->WasResized();
- }
+ Q_UNUSED(web_contents);
+ if (!m_viewClient->isFullScreenMode())
+ m_viewClient->requestFullScreenMode(toQt(origin), true);
}
void WebContentsDelegateQt::ExitFullscreenModeForTab(content::WebContents *web_contents)
{
- if (m_viewClient->isFullScreen()) {
- m_viewClient->requestFullScreen(false);
- web_contents->GetRenderViewHost()->WasResized();
- }
+ if (m_viewClient->isFullScreenMode())
+ m_viewClient->requestFullScreenMode(toQt(web_contents->GetLastCommittedURL().GetOrigin()), false);
}
bool WebContentsDelegateQt::IsFullscreenForTabOrPending(const content::WebContents* web_contents) const
{
- return m_viewClient->isFullScreen();
+ Q_UNUSED(web_contents);
+ return m_viewClient->isFullScreenMode();
}
ASSERT_ENUMS_MATCH(FilePickerController::Open, content::FileChooserParams::Open)