Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/SubresourceFilterInfoBar.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/SubresourceFilterInfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/SubresourceFilterInfoBar.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b14a0b7c45404bc5c90a01bd162df1d85ab94a7b |
| --- /dev/null |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/SubresourceFilterInfoBar.java |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2015 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. |
| + |
| +package org.chromium.chrome.browser.infobar; |
| + |
| +import org.chromium.base.annotations.CalledByNative; |
| +import org.chromium.chrome.browser.ResourceId; |
| + |
| +/** |
| + * After user proceed through Safe Browsing warning interstitials that are displayed when the site |
|
gone
2016/10/05 18:05:26
proceeds
melandory
2016/10/06 21:32:32
Done.
|
| + * ahead contains deceptive embedded content, the infobar appears, explains the feature and give |
|
gone
2016/10/05 18:05:26
gives
melandory
2016/10/06 21:32:32
Done.
|
| + * the user an ability to reload the page with the content we've blocked previously. |
| + */ |
| +public class SubresourceFilterInfoBar extends ConfirmInfoBar { |
| + private final String mExplanationMessage; |
| + |
| + @CalledByNative |
| + private static InfoBar show(int enumeratedIconId, String message, String primaryButtonText, |
| + String secondaryButtonText, String explanationMessage) { |
| + return new SubresourceFilterInfoBar(ResourceId.mapToDrawableId(enumeratedIconId), message, |
| + primaryButtonText, secondaryButtonText, explanationMessage); |
| + } |
| + |
| + private SubresourceFilterInfoBar(int iconDrawbleId, String message, String primaryButtonText, |
| + String secondaryButtonText, String explanationMessage) { |
| + super(iconDrawbleId, null, message, null, primaryButtonText, secondaryButtonText); |
| + mExplanationMessage = explanationMessage; |
|
gone
2016/10/05 18:05:26
Can't you just grab the String resource from the j
|
| + } |
| + |
| + @Override |
| + public void createContent(InfoBarLayout layout) { |
| + super.createContent(layout); |
| + InfoBarControlLayout controlLayout = layout.addControlLayout(); |
| + controlLayout.addDescription(mExplanationMessage); |
| + } |
| +} |