1 // Copyright 2018 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 
5 package org.chromium.chrome.browser.toolbar;
6 
7 import android.content.res.ColorStateList;
8 import android.view.View.OnClickListener;
9 import android.view.View.OnLongClickListener;
10 
11 import org.chromium.ui.modelutil.PropertyKey;
12 import org.chromium.ui.modelutil.PropertyModel.WritableBooleanPropertyKey;
13 import org.chromium.ui.modelutil.PropertyModel.WritableIntPropertyKey;
14 import org.chromium.ui.modelutil.PropertyModel.WritableObjectPropertyKey;
15 
16 /**
17  * The properties needed to render the tab switcher button.
18  */
19 public interface TabSwitcherButtonProperties {
20     /** The current number of tabs. */
21     public static final WritableIntPropertyKey NUMBER_OF_TABS = new WritableIntPropertyKey();
22 
23     /** The click listener for the tab switcher button. */
24     public static final WritableObjectPropertyKey<OnClickListener> ON_CLICK_LISTENER =
25             new WritableObjectPropertyKey<>();
26 
27     /** The long click listener for the tab switcher button. */
28     public static final WritableObjectPropertyKey<OnLongClickListener> ON_LONG_CLICK_LISTENER =
29             new WritableObjectPropertyKey<>();
30 
31     /** The button tint. */
32     public static final WritableObjectPropertyKey<ColorStateList> TINT =
33             new WritableObjectPropertyKey<>();
34 
35     /** Whether the button is enabled. */
36     public static final WritableBooleanPropertyKey IS_ENABLED = new WritableBooleanPropertyKey();
37 
38     public static final PropertyKey[] ALL_KEYS = new PropertyKey[] {
39             NUMBER_OF_TABS, ON_CLICK_LISTENER, ON_LONG_CLICK_LISTENER, TINT, IS_ENABLED};
40 }
41