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

Unified Diff: components/security_interstitials/core/controller_client.h

Issue 1467063002: Introduce the ChromeControllerClient class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bugfix Created 5 years, 1 month 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 | « chrome/chrome_browser.gypi ('k') | components/security_interstitials/core/controller_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/security_interstitials/core/controller_client.h
diff --git a/components/security_interstitials/core/controller_client.h b/components/security_interstitials/core/controller_client.h
index 9b18284bf999e5dc2d5e3282ccac643cf008e243..6eb41e0b59e3fd519598693b4dd727b4de54d382 100644
--- a/components/security_interstitials/core/controller_client.h
+++ b/components/security_interstitials/core/controller_client.h
@@ -17,37 +17,43 @@ namespace security_interstitials {
class MetricsHelper;
+// Constants used to communicate with the JavaScript.
+extern const char kBoxChecked[];
+extern const char kDisplayCheckBox[];
+extern const char kOptInLink[];
+extern const char kPrivacyLinkHtml[];
+
+// These represent the commands sent from the interstitial JavaScript.
+// DO NOT reorder or change these without also changing the JavaScript!
+// See components/security_interstitials/core/browser/resources/
+enum SecurityInterstitialCommands {
+ // Used by tests
+ CMD_ERROR = -3,
+ CMD_TEXT_FOUND = -2,
+ CMD_TEXT_NOT_FOUND = -1,
+ // Decisions
+ CMD_DONT_PROCEED = 0,
+ CMD_PROCEED = 1,
+ // Ways for user to get more information
+ CMD_SHOW_MORE_SECTION = 2,
+ CMD_OPEN_HELP_CENTER = 3,
+ CMD_OPEN_DIAGNOSTIC = 4,
+ // Primary button actions
+ CMD_RELOAD = 5,
+ CMD_OPEN_DATE_SETTINGS = 6,
+ CMD_OPEN_LOGIN = 7,
+ // Safe Browsing Extended Reporting
+ CMD_DO_REPORT = 8,
+ CMD_DONT_REPORT = 9,
+ CMD_OPEN_REPORTING_PRIVACY = 10,
+ // Report a phishing error
+ CMD_REPORT_PHISHING_ERROR = 11,
+};
+
// Provides methods for handling commands from the user, which requires some
// embedder-specific abstraction.
class ControllerClient {
public:
- // These represent the commands sent from the interstitial JavaScript.
- // DO NOT reorder or change these without also changing the JavaScript!
- // See components/security_interstitials/core/browser/resources/
- enum SecurityInterstitialCommands {
- // Used by tests
- CMD_ERROR = -3,
- CMD_TEXT_FOUND = -2,
- CMD_TEXT_NOT_FOUND = -1,
- // Decisions
- CMD_DONT_PROCEED = 0,
- CMD_PROCEED = 1,
- // Ways for user to get more information
- CMD_SHOW_MORE_SECTION = 2,
- CMD_OPEN_HELP_CENTER = 3,
- CMD_OPEN_DIAGNOSTIC = 4,
- // Primary button actions
- CMD_RELOAD = 5,
- CMD_OPEN_DATE_SETTINGS = 6,
- CMD_OPEN_LOGIN = 7,
- // Safe Browsing Extended Reporting
- CMD_DO_REPORT = 8,
- CMD_DONT_REPORT = 9,
- CMD_OPEN_REPORTING_PRIVACY = 10,
- // Report a phishing error
- CMD_REPORT_PHISHING_ERROR = 11,
- };
-
ControllerClient();
virtual ~ControllerClient();
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/security_interstitials/core/controller_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698