diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2014-03-05 11:06:09 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-08-08 17:19:15 +0200 |
commit | 3860d79c0b0d1c623746e40b1d0234674535cc90 (patch) | |
tree | 57a52a6e52c26bcbb2d73410e92aaefdd5d52caf /src/core/web_contents_delegate_qt.cpp | |
parent | 5c89832668288db79ed0c79d3dda68af62285d18 (diff) |
Use VisitedLinks component.
This allows to resolve visited links in the render process.
The newly introduced API at the Core layer should allow exposing
this functionality to our widgets and Qt quick API layers.
Change-Id: I256376afcfe79014dc274e2dddbac1986a884a93
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index b003a63a7..1de3ce160 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -50,6 +50,7 @@ #include "web_contents_adapter.h" #include "web_contents_adapter_client.h" #include "web_engine_context.h" +#include "web_engine_visited_links_manager.h" #include "content/public/browser/favicon_status.h" #include "content/public/browser/invalidate_type.h" @@ -58,6 +59,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/common/favicon_url.h" #include "content/public/common/file_chooser_params.h" +#include "content/public/common/frame_navigate_params.h" // Maps the LogSeverity defines in base/logging.h to the web engines message levels. @@ -251,3 +253,9 @@ void WebContentsDelegateQt::UpdateTargetURL(content::WebContents *source, int32 Q_UNUSED(page_id) m_viewClient->didUpdateTargetURL(toQt(url)); } +void WebContentsDelegateQt::DidNavigateAnyFrame(const content::LoadCommittedDetails &, const content::FrameNavigateParams ¶ms) +{ + if (!params.should_update_history) + return; + WebEngineContext::current()->visitedLinksManager()->addUrl(params.url); +} |