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

Unified Diff: android_webview/browser/aw_browser_context.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 pass no_disk parameter instead of using delegate. 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
« no previous file with comments | « android_webview/browser/DEPS ('k') | android_webview/browser/aw_browser_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_browser_context.h
diff --git a/android_webview/browser/aw_browser_context.h b/android_webview/browser/aw_browser_context.h
index 0e4708bae163bc87d502f7f73105a321e85868a3..ae2b39589e536676ca1b6401e65cc9ee77c87510 100644
--- a/android_webview/browser/aw_browser_context.h
+++ b/android_webview/browser/aw_browser_context.h
@@ -5,28 +5,55 @@
#ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_
#define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_
+#include <vector>
+
#include "android_webview/browser/aw_download_manager_delegate.h"
#include "base/file_path.h"
#include "base/memory/ref_counted.h"
+#include "components/visitedlink/browser/visitedlink_delegate.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/geolocation_permission_context.h"
+class GURL;
+
+namespace components {
+class VisitedLinkMaster;
+} // namespace components
+
+namespace content {
+class WebContents;
+} // namespace content
+
namespace android_webview {
class AwURLRequestContextGetter;
typedef content::GeolocationPermissionContext* GeolocationPermissionFactoryFn();
-class AwBrowserContext : public content::BrowserContext {
+class AwBrowserContext : public content::BrowserContext,
+ public components::VisitedLinkDelegate {
public:
+
AwBrowserContext(
const FilePath path,
GeolocationPermissionFactoryFn* geolocation_permission_factory);
virtual ~AwBrowserContext();
+ // Convenience method to returns the AwBrowserContext corresponding to the
+ // given WebContents.
+ static AwBrowserContext* FromWebContents(
+ content::WebContents* web_contents);
+
// Called before BrowserThreads are created.
void InitializeBeforeThreadCreation();
+ // Maps to BrowserMainParts::PreMainMessageLoopRun.
+ void PreMainMessageLoopRun();
+
+ // These methods map to Add methods in components::VisitedLinkMaster.
+ void AddVisitedURL(const GURL& url);
+ void AddVisitedURLs(const std::vector<GURL>& urls);
+
// content::BrowserContext implementation.
virtual FilePath GetPath() OVERRIDE;
virtual bool IsOffTheRecord() const OVERRIDE;
@@ -50,6 +77,10 @@ class AwBrowserContext : public content::BrowserContext {
GetSpeechRecognitionPreferences() OVERRIDE;
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
+ // components::VisitedLinkDelegate implementation.
+ virtual void RebuildTable(
+ const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE;
+
private:
// The file path where data for this context is persisted.
@@ -62,6 +93,8 @@ class AwBrowserContext : public content::BrowserContext {
AwDownloadManagerDelegate download_manager_delegate_;
+ scoped_ptr<components::VisitedLinkMaster> visitedlink_master_;
+
DISALLOW_COPY_AND_ASSIGN(AwBrowserContext);
};
« no previous file with comments | « android_webview/browser/DEPS ('k') | android_webview/browser/aw_browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698