summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Kallai <kadam@inf.u-szeged.hu>2013-11-27 08:52:34 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-02 14:33:11 +0100
commit32fffe6b2f8a5e44b6f8d3056104c2010726037c (patch)
tree0fd67afca3b1d26be71412afdac0fbb586fa60fe
parentfcbb233b7f25985febdfb6b441b9fb447ce04085 (diff)
Implement DidFailProvisionalLoad function
The WebContentObserver::DidFailLoad event doesn't handle all of the errors during the web content loading (eg. network errors). Thus WebContentObserver::DidFailProvisionalLoad should be binded on Qt side to handle these errors too. This event is handled by the WebContentsDelegateQt::DidFailLoad function now. Change-Id: I1421214dd94481a1e27cda8d35a35d418289b604 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
-rw-r--r--src/core/web_contents_delegate_qt.cpp6
-rw-r--r--src/core/web_contents_delegate_qt.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 5a96d9be4..27d1c3e9a 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -109,6 +109,12 @@ void WebContentsDelegateQt::DidFinishLoad(int64 frame_id, const GURL &validated_
m_viewClient->loadFinished(true);
}
+void WebContentsDelegateQt::DidFailProvisionalLoad(int64 frame_id, bool is_main_frame, const GURL& validated_url, int error_code, const string16& error_description, content::RenderViewHost* render_view_host)
+{
+ if (is_main_frame)
+ DidFailLoad(frame_id, validated_url, is_main_frame, error_code, error_description, render_view_host);
+}
+
void WebContentsDelegateQt::DidUpdateFaviconURL(int32 page_id, const std::vector<content::FaviconURL>& candidates)
{
Q_UNUSED(page_id)
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index 9e27c043f..b0cfd8952 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -71,6 +71,7 @@ public:
virtual void DidFailLoad(int64 frame_id, const GURL &validated_url, bool is_main_frame, int error_code, const string16 &error_description, content::RenderViewHost *render_view_host) Q_DECL_OVERRIDE;
virtual void DidFinishLoad(int64 frame_id, const GURL &validated_url, bool is_main_frame, content::RenderViewHost *render_view_host) Q_DECL_OVERRIDE;
virtual void DidUpdateFaviconURL(int32 page_id, const std::vector<content::FaviconURL>& candidates) Q_DECL_OVERRIDE;
+ virtual void DidFailProvisionalLoad(int64 frame_id, bool is_main_frame, const GURL& validated_url, int error_code, const string16& error_description, content::RenderViewHost* render_view_host) Q_DECL_OVERRIDE;
virtual content::JavaScriptDialogManager *GetJavaScriptDialogManager() Q_DECL_OVERRIDE;
private: