blob: 6f8f1edf85c7a52108412bd1bf752306e3990de2 [file] [log] [blame]
Xinghui Lu74f0391a2020-10-12 20:35:311// Copyright 2020 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_INTERSTITIALS_CHROME_SETTINGS_PAGE_HELPER_H_
6#define CHROME_BROWSER_INTERSTITIALS_CHROME_SETTINGS_PAGE_HELPER_H_
7
8#include <memory>
9
10#include "components/security_interstitials/content/settings_page_helper.h"
11
12namespace content {
13class WebContents;
14}
15
16namespace security_interstitials {
17
18// This class is used to open a Chrome setting page in a security interstitial.
19// The implementation is different on desktop platforms and on Android. On
20// desktop, it opens a new tab and navigation to chrome://settings/*.
21// TODO(crbug.com/1130721): On Android, it creates an intent to launch a
22// Settings activity.
23class ChromeSettingsPageHelper : public SettingsPageHelper {
24 public:
25 static std::unique_ptr<security_interstitials::SettingsPageHelper>
26 CreateChromeSettingsPageHelper();
27
28 ChromeSettingsPageHelper() = default;
29 ~ChromeSettingsPageHelper() override = default;
30 ChromeSettingsPageHelper(const ChromeSettingsPageHelper&) = delete;
31 ChromeSettingsPageHelper& operator=(const ChromeSettingsPageHelper&) = delete;
32
33 // SettingsPageHelper:
34 void OpenEnhancedProtectionSettings(
35 content::WebContents* web_contents) const override;
36};
37
38} // namespace security_interstitials
39
40#endif // CHROME_BROWSER_INTERSTITIALS_CHROME_SETTINGS_PAGE_HELPER_H_