summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-07-01 11:45:46 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-07-01 11:50:03 +0200
commit0f881dd08ad8801144ff22c199d68f2b722c27ae (patch)
tree0cd8479aedf8ad46be8703f6a3e798ab4fec562d /src/core/web_contents_delegate_qt.cpp
parentaf855756f728f608f9e30ba3c334564229341da9 (diff)
Update BrowserContext and WebContentsDelegate for Chromium 44
Adds and changes interfaces to work with Chromium 44. Change-Id: Id7c02e7b1be255d591f7ac5449dde5823c261eb5 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 865ee8e2c..93fabf15a 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -127,7 +127,7 @@ void WebContentsDelegateQt::AddNewContents(content::WebContents* source, content
void WebContentsDelegateQt::CloseContents(content::WebContents *source)
{
m_viewClient->close();
- GetJavaScriptDialogManager()->CancelActiveAndPendingDialogs(source);
+ GetJavaScriptDialogManager(source)->CancelActiveAndPendingDialogs(source);
}
void WebContentsDelegateQt::LoadProgressChanged(content::WebContents* source, double progress)
@@ -229,19 +229,28 @@ void WebContentsDelegateQt::DidUpdateFaviconURL(const std::vector<content::Favic
}
}
-content::JavaScriptDialogManager *WebContentsDelegateQt::GetJavaScriptDialogManager()
+content::JavaScriptDialogManager *WebContentsDelegateQt::GetJavaScriptDialogManager(content::WebContents *)
{
return JavaScriptDialogManagerQt::GetInstance();
}
-void WebContentsDelegateQt::ToggleFullscreenModeForTab(content::WebContents* web_contents, bool enter_fullscreen)
+void WebContentsDelegateQt::EnterFullscreenModeForTab(content::WebContents *web_contents, const GURL& origin)
{
- if (m_viewClient->isFullScreen() != enter_fullscreen) {
- m_viewClient->requestFullScreen(enter_fullscreen);
+ Q_UNUSED(origin); // FIXME
+ if (!m_viewClient->isFullScreen()) {
+ m_viewClient->requestFullScreen(true);
web_contents->GetRenderViewHost()->WasResized();
}
}
+void WebContentsDelegateQt::ExitFullscreenModeForTab(content::WebContents *web_contents)
+{
+ if (m_viewClient->isFullScreen()) {
+ m_viewClient->requestFullScreen(false);
+ web_contents->GetRenderViewHost()->WasResized();
+ }
+}
+
bool WebContentsDelegateQt::IsFullscreenForTabOrPending(const content::WebContents* web_contents) const
{
return m_viewClient->isFullScreen();