summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_delegate_qt.h')
-rw-r--r--src/core/web_contents_delegate_qt.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index 913bf356c..2e37c498a 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -68,6 +68,7 @@ namespace content {
namespace QtWebEngineCore {
class WebContentsAdapterClient;
+class WebEngineSettings;
class SavePageInfo
{
@@ -104,7 +105,7 @@ public:
void LoadProgressChanged(content::WebContents* source, double progress) override;
void HandleKeyboardEvent(content::WebContents *source, const content::NativeWebKeyboardEvent &event) override;
content::ColorChooser *OpenColorChooser(content::WebContents *source, SkColor color, const std::vector<content::ColorSuggestion> &suggestion) override;
- void WebContentsCreated(content::WebContents* source_contents, int opener_render_process_id, int opener_render_frame_id, const std::string& frame_name, const GURL& target_url, content::WebContents* new_contents) override;
+ void WebContentsCreated(content::WebContents* source_contents, int opener_render_process_id, int opener_render_frame_id, const std::string& frame_name, const GURL& target_url, content::WebContents* new_contents, const base::Optional<content::WebContents::CreateParams>& create_params) override;
content::JavaScriptDialogManager *GetJavaScriptDialogManager(content::WebContents *source) override;
void EnterFullscreenModeForTab(content::WebContents* web_contents, const GURL& origin) override;
void ExitFullscreenModeForTab(content::WebContents*) override;
@@ -126,18 +127,18 @@ public:
// WebContentsObserver overrides
void RenderFrameDeleted(content::RenderFrameHost *render_frame_host) override;
- void DidStartProvisionalLoadForFrame(content::RenderFrameHost *render_frame_host, const GURL &validated_url, bool is_error_page, bool is_iframe_srcdoc) override;
- void DidCommitProvisionalLoadForFrame(content::RenderFrameHost *render_frame_host, const GURL &url, ui::PageTransition transition_type) override;
- void DidFailProvisionalLoad(content::RenderFrameHost *render_frame_host, const GURL &validated_url,
- int error_code, const base::string16 &error_description, bool was_ignored_by_handler) override;
+ void DidStartNavigation(content::NavigationHandle *navigation_handle) override;
+ void DidFinishNavigation(content::NavigationHandle *navigation_handle) override;
void DidFailLoad(content::RenderFrameHost *render_frame_host, const GURL &validated_url,
int error_code, const base::string16 &error_description, bool was_ignored_by_handler) override;
void DidFinishLoad(content::RenderFrameHost *render_frame_host, const GURL &validated_url) override;
+ void BeforeUnloadFired(const base::TimeTicks& proceed_time) override;
void DidUpdateFaviconURL(const std::vector<content::FaviconURL> &candidates) override;
- void DidNavigateAnyFrame(content::RenderFrameHost *render_frame_host, const content::LoadCommittedDetails &details, const content::FrameNavigateParams &params) override;
void WasShown() override;
void DidFirstVisuallyNonEmptyPaint() override;
+ void ActivateContents(content::WebContents* contents) override;
+ void didFailLoad(const QUrl &url, int errorCode, const QString &errorDescription);
void overrideWebPreferences(content::WebContents *, content::WebPreferences*);
void allowCertificateError(const QSharedPointer<CertificateErrorController> &) ;
void requestGeolocationPermission(const QUrl &requestingOrigin);
@@ -147,8 +148,12 @@ public:
void setSavePageInfo(const SavePageInfo &spi) { m_savePageInfo = spi; }
const SavePageInfo &savePageInfo() { return m_savePageInfo; }
+ WebEngineSettings *webEngineSettings() const;
+
private:
QWeakPointer<WebContentsAdapter> createWindow(content::WebContents *new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture);
+ void EmitLoadStarted(const QUrl &url, bool isErrorPage = false);
+ void EmitLoadFinished(bool success, const QUrl &url, bool isErrorPage = false, int errorCode = 0, const QString &errorDescription = QString());
WebContentsAdapterClient *m_viewClient;
QString m_lastSearchedString;
@@ -158,6 +163,7 @@ private:
SavePageInfo m_savePageInfo;
QSharedPointer<FilePickerController> m_filePickerController;
QUrl m_initialTargetUrl;
+ int m_lastLoadProgress;
};
} // namespace QtWebEngineCore