1 // Copyright 2020 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.tabmodel; 6 7 import androidx.annotation.IntDef; 8 9 import org.chromium.base.supplier.Supplier; 10 11 import java.lang.annotation.Retention; 12 import java.lang.annotation.RetentionPolicy; 13 14 /** 15 * Defines the policy to determine the next tab after a tab is closed. 16 */ 17 @Retention(RetentionPolicy.SOURCE) 18 @IntDef({NextTabPolicy.HIERARCHICAL, NextTabPolicy.LOCATIONAL}) 19 public @interface NextTabPolicy { 20 /** 21 * Prefer to show a parent tab next. 22 */ 23 int HIERARCHICAL = 0; 24 25 /** 26 * Prefer to show an adjacent tab next. 27 */ 28 int LOCATIONAL = 1; 29 30 /** 31 * Supplier for {@link NextTabPolicy}. 32 */ 33 interface NextTabPolicySupplier extends Supplier</*@NextTabPolicy*/ Integer> {} 34 } 35