Commit 20891520 authored by Peter E Conn's avatar Peter E Conn Committed by Commit Bot

🤝 Disable PostMessage on Trusted Web Activities.

Moving Trusted Web Activities over to CustomTabActivity gets us
PostMessage for free. Unfortunately we're not ready to launch that,
so disable it for the time being.

Bug: 871266
Change-Id: Iaef2c08aea87be888cd98b102aeb4a87e888fd04
Reviewed-on: https://chromium-review.googlesource.com/1181139Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Commit-Queue: Peter Conn <peconn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584473}
parent c359e685
...@@ -273,6 +273,7 @@ public abstract class ChromeFeatureList { ...@@ -273,6 +273,7 @@ public abstract class ChromeFeatureList {
public static final String QUERY_IN_OMNIBOX = "QueryInOmnibox"; public static final String QUERY_IN_OMNIBOX = "QueryInOmnibox";
public static final String TAB_REPARENTING = "TabReparenting"; public static final String TAB_REPARENTING = "TabReparenting";
public static final String TRUSTED_WEB_ACTIVITY = "TrustedWebActivity"; public static final String TRUSTED_WEB_ACTIVITY = "TrustedWebActivity";
public static final String TRUSTED_WEB_ACTIVITY_POST_MESSAGE = "TrustedWebActivityPostMessage";
public static final String VIDEO_PERSISTENCE = "VideoPersistence"; public static final String VIDEO_PERSISTENCE = "VideoPersistence";
public static final String UNIFIED_CONSENT = "UnifiedConsent"; public static final String UNIFIED_CONSENT = "UnifiedConsent";
public static final String VR_BROWSING_FEEDBACK = "VrBrowsingFeedback"; public static final String VR_BROWSING_FEEDBACK = "VrBrowsingFeedback";
......
...@@ -660,6 +660,10 @@ public class CustomTabActivity extends ChromeActivity { ...@@ -660,6 +660,10 @@ public class CustomTabActivity extends ChromeActivity {
} }
if (mTrustedWebActivityUi != null) { if (mTrustedWebActivityUi != null) {
if (!ChromeFeatureList.isEnabled(ChromeFeatureList.TRUSTED_WEB_ACTIVITY_POST_MESSAGE)) {
mConnection.resetPostMessageHandlerForSession(mSession, null);
}
mTrustedWebActivityUi.attemptVerificationForInitialUrl(url, getActivityTab()); mTrustedWebActivityUi.attemptVerificationForInitialUrl(url, getActivityTab());
mTrustedWebActivityUi.initialShowSnackbarIfNeeded(); mTrustedWebActivityUi.initialShowSnackbarIfNeeded();
} }
......
...@@ -138,6 +138,7 @@ const base::Feature* kFeaturesExposedToJava[] = { ...@@ -138,6 +138,7 @@ const base::Feature* kFeaturesExposedToJava[] = {
&kSpecialLocaleWrapper, &kSpecialLocaleWrapper,
&kTabReparenting, &kTabReparenting,
&kTrustedWebActivity, &kTrustedWebActivity,
&kTrustedWebActivityPostMessage,
&kVideoPersistence, &kVideoPersistence,
&kVrBrowsingFeedback, &kVrBrowsingFeedback,
&kVrBrowsingNativeAndroidUi, &kVrBrowsingNativeAndroidUi,
...@@ -402,6 +403,9 @@ const base::Feature kTabReparenting{"TabReparenting", ...@@ -402,6 +403,9 @@ const base::Feature kTabReparenting{"TabReparenting",
const base::Feature kTrustedWebActivity{"TrustedWebActivity", const base::Feature kTrustedWebActivity{"TrustedWebActivity",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kTrustedWebActivityPostMessage{
"TrustedWebActivityPostMessage", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kUserMediaScreenCapturing{ const base::Feature kUserMediaScreenCapturing{
"UserMediaScreenCapturing", base::FEATURE_DISABLED_BY_DEFAULT}; "UserMediaScreenCapturing", base::FEATURE_DISABLED_BY_DEFAULT};
......
...@@ -84,6 +84,7 @@ extern const base::Feature kSpecialLocaleWrapper; ...@@ -84,6 +84,7 @@ extern const base::Feature kSpecialLocaleWrapper;
extern const base::Feature kTabModalJsDialog; extern const base::Feature kTabModalJsDialog;
extern const base::Feature kTabReparenting; extern const base::Feature kTabReparenting;
extern const base::Feature kTrustedWebActivity; extern const base::Feature kTrustedWebActivity;
extern const base::Feature kTrustedWebActivityPostMessage;
extern const base::Feature kUserMediaScreenCapturing; extern const base::Feature kUserMediaScreenCapturing;
extern const base::Feature kVideoPersistence; extern const base::Feature kVideoPersistence;
extern const base::Feature kVrBrowsingFeedback; extern const base::Feature kVrBrowsingFeedback;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment