Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1332)

Unified Diff: android_webview/browser/renderer_host/aw_render_view_host_ext.cc

Issue 11860014: Android WebView visited link highlighting implementation part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move VisitedLinkMaster to AwBrowserContext Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d3037f5ff89878ee397ea800a8df2ca53e022c98 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
@@ -4,6 +4,7 @@
#include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
+#include "android_webview/browser/aw_browser_context.h"
#include "android_webview/common/render_view_messages.h"
#include "base/android/scoped_java_ref.h"
#include "base/callback.h"
@@ -11,6 +12,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 {
@@ -71,6 +73,15 @@ void AwRenderViewHostExt::RenderViewGone(base::TerminationStatus status) {
}
}
+void AwRenderViewHostExt::DidNavigateAnyFrame(
+ const content::LoadCommittedDetails& details,
+ const content::FrameNavigateParams& params) {
+ DCHECK(CalledOnValidThread());
+
+ AwBrowserContext::FromBrowserContext(
+ web_contents()->GetBrowserContext())->AddVisitedURL(params.base_url);
benm (inactive) 2013/01/16 01:00:22 interesting, so we will alter the visited history
joth 2013/01/16 01:10:02 this is a slightly awkward dereferencing chain. It
boliu 2013/01/16 01:10:08 This is mostly copied from chrome implementation.
boliu 2013/01/16 01:35:34 I think this is fine On 2013/01/16 01:10:02, joth
boliu 2013/01/16 01:39:20 Oh, what we could have is AwBrowserContext::FromWe
boliu 2013/01/16 01:58:44 Use AwBrowserContext::FromWebContents. Lots of tim
+}
+
bool AwRenderViewHostExt::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(AwRenderViewHostExt, message)

Powered by Google App Engine
This is Rietveld 408576698