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

Unified Diff: android_webview/browser/aw_safe_browsing_ui_manager.h

Issue 2635693002: [WebView] initial webview-side implementation of safebrowsing (Closed)
Patch Set: rename lock, add crbug comment Created 3 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/aw_safe_browsing_ui_manager.h
diff --git a/android_webview/browser/aw_safe_browsing_ui_manager.h b/android_webview/browser/aw_safe_browsing_ui_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..f09bdf687513f4ed0090d03aafdf4334163a33ca
--- /dev/null
+++ b/android_webview/browser/aw_safe_browsing_ui_manager.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// The Safe Browsing service is responsible for downloading anti-phishing and
+// anti-malware tables and checking urls against them. This is android_webview
+// specific ui_manager.
+
+#ifndef ANDROID_WEBVIEW_BROWSER_AW_SAFE_BROWSING_UI_MANAGER_H_
+#define ANDROID_WEBVIEW_BROWSER_AW_SAFE_BROWSING_UI_MANAGER_H_
+
+#include "components/safe_browsing/base_ui_manager.h"
+#include "content/public/browser/web_contents.h"
+
+namespace android_webview {
+
+class AwSafeBrowsingUIManager : public safe_browsing::BaseUIManager {
+ public:
+ class UIManagerClient {
+ public:
+ static UIManagerClient* FromWebContents(content::WebContents* web_contents);
+
+ // Whether this web contents can show an interstitial
+ virtual bool CanShowInterstitial() = 0;
+ };
+
+ // Construction needs to happen on the UI thread.
+ AwSafeBrowsingUIManager();
+
+ void DisplayBlockingPage(const UnsafeResource& resource) override;
+
+ protected:
+ ~AwSafeBrowsingUIManager() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AwSafeBrowsingUIManager);
+};
+
+} // namespace android_webview
+
+#endif // ANDROID_WEBVIEW_BROWSER_AW_SAFE_BROWSING_UI_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698