1 // Copyright 2013 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;
9 * Functions needed to display an InfoBar UI.
11 public interface InfoBarView {
13 * Prepares the InfoBar for display and adds InfoBar-specific controls to the layout.
14 * @param layout Layout containing all of the controls.
16 public void createContent(InfoBarLayout layout);
19 * Takes some action related to the link being clicked.
21 public void onLinkClicked();
24 * Takes some action related to the close button being clicked.
26 public void onCloseButtonClicked();
29 * Performs some action related to either the primary or secondary button being pressed.
30 * @param isPrimaryButton True if the primary button was clicked, false otherwise.
32 public void onButtonClicked(boolean isPrimaryButton);
35 * Sets whether or not controls for this View should be clickable.
36 * @param state If set to false, controls cannot be clicked and will be grayed out.
38 public void setControlsEnabled(boolean state);