Chromium Code Reviews| Index: android_webview/browser/renderer_host/aw_render_view_host_ext.cc |
| diff --git a/android_webview/browser/renderer_host/aw_render_view_host_ext.cc b/android_webview/browser/renderer_host/aw_render_view_host_ext.cc |
| index 73bcad0c5482ac625d9af265876a9950c29aa6cd..622f3cca2a5c0ad30445cf5d492c0e8e043736cb 100644 |
| --- a/android_webview/browser/renderer_host/aw_render_view_host_ext.cc |
| +++ b/android_webview/browser/renderer_host/aw_render_view_host_ext.cc |
| @@ -11,6 +11,7 @@ |
| #include "content/public/browser/render_process_host.h" |
| #include "content/public/browser/user_metrics.h" |
| #include "content/public/browser/web_contents.h" |
| +#include "content/public/common/frame_navigate_params.h" |
| namespace android_webview { |
| @@ -18,10 +19,13 @@ AwRenderViewHostExt::AwRenderViewHostExt(content::WebContents* contents, |
| Client* client) |
| : content::WebContentsObserver(contents), |
| has_new_hit_test_data_(false), |
| + visitedlink_master_(contents->GetBrowserContext(), this), |
| client_(client) { |
| + visitedlink_master_.Init(); |
| } |
| -AwRenderViewHostExt::~AwRenderViewHostExt() {} |
| +AwRenderViewHostExt::~AwRenderViewHostExt() { |
| +} |
| void AwRenderViewHostExt::DocumentHasImages(DocumentHasImagesResult result) { |
| DCHECK(CalledOnValidThread()); |
| @@ -71,6 +75,14 @@ void AwRenderViewHostExt::RenderViewGone(base::TerminationStatus status) { |
| } |
| } |
| +void AwRenderViewHostExt::DidNavigateAnyFrame( |
| + const content::LoadCommittedDetails& details, |
| + const content::FrameNavigateParams& params) { |
| + DCHECK(CalledOnValidThread()); |
| + |
| + visitedlink_master_.AddURL(params.base_url); |
| +} |
| + |
| bool AwRenderViewHostExt::OnMessageReceived(const IPC::Message& message) { |
| bool handled = true; |
| IPC_BEGIN_MESSAGE_MAP(AwRenderViewHostExt, message) |
| @@ -86,6 +98,31 @@ bool AwRenderViewHostExt::OnMessageReceived(const IPC::Message& message) { |
| return handled ? true : WebContentsObserver::OnMessageReceived(message); |
| } |
| +bool AwRenderViewHostExt::PersistToDisk() const { |
| + // Persistence of VisitedLink database is handled by the embedding app. |
|
joth
2013/01/14 23:40:35
would it be possible/useful to mention which funct
|
| + return false; |
| +} |
| + |
| +bool AwRenderViewHostExt::AreEquivalentContexts( |
| + content::BrowserContext* context1, |
| + content::BrowserContext* context2) { |
| + DCHECK(CalledOnValidThread()); |
| + |
| + // Raw pointer comparison since Android WebView does not have sub-contexts |
| + // like incognito. |
| + return context1 == context2; |
| +} |
| + |
| +void AwRenderViewHostExt::RebuildTable( |
| + const scoped_refptr<URLEnumerator>& enumerator) { |
| + DCHECK(CalledOnValidThread()); |
| + |
| + // Android WebView rebuilds from WebChromeClient which can change in the |
| + // lifetime of this WebView and may not yet be set here. This initialization |
| + // path is not used. |
|
joth
2013/01/14 23:40:35
(ditto, ish. i.e. how does the restore from disk c
|
| + enumerator->OnComplete(true); |
| +} |
| + |
| void AwRenderViewHostExt::OnDocumentHasImagesResponse(int msg_id, |
| bool has_images) { |
| DCHECK(CalledOnValidThread()); |