1 // Copyright 2014 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.
5 package org.chromium.chrome.browser.infobar;
7 import org.chromium.base.CalledByNative;
8 import org.chromium.chrome.browser.ResourceId;
11 * Provides JNI methods for the infobar to notify that the generated password was saved.
13 public class GeneratedPasswordSavedInfoBarDelegate {
15 * Creates and shows the infobar to notify that the generated password was saved.
16 * @param nativeInfoBar Pointer to the native infobar.
17 * @param enumeratedIconId Enum ID corresponding to the icon that the infobar will show.
18 * @param messageText Message to display in the infobar.
19 * @param inlineLinkRangeStart The start of the range of the messageText that should be a link.
20 * @param inlineLinkRangeEnd The end of the range of the messageText that should be a link.
21 * @param buttonLabel String to display on the button.
24 private static InfoBar show(long nativeInfoBar, int enumeratedIconId, String messageText,
25 int inlineLinkRangeStart, int inlineLinkRangeEnd, String buttonLabel) {
26 return new GeneratedPasswordSavedInfoBar(nativeInfoBar,
27 ResourceId.mapToDrawableId(enumeratedIconId), messageText, inlineLinkRangeStart,
28 inlineLinkRangeEnd, buttonLabel);