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. 4 5package org.chromium.chrome.browser.infobar; 6 7 8/** 9 * Functions needed to display an InfoBar UI. 10 */ 11public interface InfoBarView { 12 /** 13 * Prepares the InfoBar for display and adds InfoBar-specific controls to the layout. 14 * @param layout Layout containing all of the controls. 15 */ 16 public void createContent(InfoBarLayout layout); 17 18 /** 19 * Takes some action related to the link being clicked. 20 */ 21 public void onLinkClicked(); 22 23 /** 24 * Takes some action related to the close button being clicked. 25 */ 26 public void onCloseButtonClicked(); 27 28 /** 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. 31 */ 32 public void onButtonClicked(boolean isPrimaryButton); 33 34 /** 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. 37 */ 38 public void setControlsEnabled(boolean state); 39} 40