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

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

Issue 11860014: Android WebView visited link highlighting implementation part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to crrev.com/11884034. AddObserver fix. 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.h
diff --git a/android_webview/browser/renderer_host/aw_render_view_host_ext.h b/android_webview/browser/renderer_host/aw_render_view_host_ext.h
index 83bd439411ab2dbe2760ee7c3f76ea3f7a91d261..8c5479040060f1ba93baff38a7201a3fe3d38f4b 100644
--- a/android_webview/browser/renderer_host/aw_render_view_host_ext.h
+++ b/android_webview/browser/renderer_host/aw_render_view_host_ext.h
@@ -10,13 +10,21 @@
#include "android_webview/common/aw_hit_test_data.h"
#include "base/callback_forward.h"
#include "base/threading/non_thread_safe.h"
+#include "components/visitedlink/browser/visitedlink_delegate.h"
+#include "components/visitedlink/browser/visitedlink_master.h"
+
+namespace content {
+struct FrameNavigateParams;
+struct LoadCommittedDetails;
+} // namespace content
namespace android_webview {
// Provides RenderViewHost wrapper functionality for sending WebView-specific
// IPC messages to the renderer and from there to WebKit.
class AwRenderViewHostExt : public content::WebContentsObserver,
- public base::NonThreadSafe {
+ public base::NonThreadSafe,
+ public components::VisitedLinkDelegate {
public:
class Client {
public:
@@ -53,8 +61,19 @@ class AwRenderViewHostExt : public content::WebContentsObserver,
private:
// content::WebContentsObserver implementation.
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
+ virtual void DidNavigateAnyFrame(
+ const content::LoadCommittedDetails& details,
+ const content::FrameNavigateParams& params) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ // components::VisitedLinkDelegate implementation.
+ virtual bool PersistToDisk() const OVERRIDE;
+ virtual bool AreEquivalentContexts(
+ content::BrowserContext* context1,
+ content::BrowserContext* context2) OVERRIDE;
+ virtual void RebuildTable(
+ const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE;
+
void OnDocumentHasImagesResponse(int msg_id, bool has_images);
void OnUpdateHitTestData(const AwHitTestData& hit_test_data);
void OnPictureUpdated();
@@ -68,6 +87,8 @@ class AwRenderViewHostExt : public content::WebContentsObserver,
bool has_new_hit_test_data_;
+ components::VisitedLinkMaster visitedlink_master_;
+
Client* client_;
DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt);

Powered by Google App Engine
This is Rietveld 408576698