summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--src/core/browser_context_qt.cpp5
-rw-r--r--src/core/browser_context_qt.h1
-rw-r--r--src/core/web_contents_delegate_qt.cpp19
-rw-r--r--src/core/web_contents_delegate_qt.h5
4 files changed, 23 insertions, 7 deletions
diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp
index d947f8486..28486cced 100644
--- a/src/core/browser_context_qt.cpp
+++ b/src/core/browser_context_qt.cpp
@@ -135,6 +135,11 @@ content::SSLHostStateDelegate* BrowserContextQt::GetSSLHostStateDelegate()
return 0;
}
+scoped_ptr<content::ZoomLevelDelegate> BrowserContextQt::CreateZoomLevelDelegate(const base::FilePath&)
+{
+ return nullptr;
+}
+
content::PermissionManager *BrowserContextQt::GetPermissionManager()
{
if (!permissionManager)
diff --git a/src/core/browser_context_qt.h b/src/core/browser_context_qt.h
index ba1b94dc2..eccd684a3 100644
--- a/src/core/browser_context_qt.h
+++ b/src/core/browser_context_qt.h
@@ -73,6 +73,7 @@ public:
virtual content::PushMessagingService* GetPushMessagingService() Q_DECL_OVERRIDE;
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() Q_DECL_OVERRIDE;
net::URLRequestContextGetter *CreateRequestContext(content::ProtocolHandlerMap *protocol_handlers);
+ virtual scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(const base::FilePath& partition_path) Q_DECL_OVERRIDE;
virtual content::PermissionManager *GetPermissionManager() Q_DECL_OVERRIDE;
BrowserContextAdapter *adapter() { return m_adapter; }
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();
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index e2a6a2cbd..b983738e9 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -78,8 +78,9 @@ public:
virtual void CloseContents(content::WebContents *source) Q_DECL_OVERRIDE;
virtual void LoadProgressChanged(content::WebContents* source, double progress) Q_DECL_OVERRIDE;
virtual void HandleKeyboardEvent(content::WebContents *source, const content::NativeWebKeyboardEvent &event) Q_DECL_OVERRIDE;
- virtual content::JavaScriptDialogManager *GetJavaScriptDialogManager() Q_DECL_OVERRIDE;
- virtual void ToggleFullscreenModeForTab(content::WebContents* web_contents, bool enter_fullscreen) Q_DECL_OVERRIDE;
+ virtual content::JavaScriptDialogManager *GetJavaScriptDialogManager(content::WebContents *source) Q_DECL_OVERRIDE;
+ virtual void EnterFullscreenModeForTab(content::WebContents* web_contents, const GURL& origin) Q_DECL_OVERRIDE;
+ virtual void ExitFullscreenModeForTab(content::WebContents*) Q_DECL_OVERRIDE;
virtual bool IsFullscreenForTabOrPending(const content::WebContents* web_contents) const Q_DECL_OVERRIDE;
virtual void RunFileChooser(content::WebContents *, const content::FileChooserParams &params) Q_DECL_OVERRIDE;
virtual bool AddMessageToConsole(content::WebContents* source, int32 level, const base::string16& message, int32 line_no, const base::string16& source_id) Q_DECL_OVERRIDE;