OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.util; | 5 package org.chromium.chrome.browser.util; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.content.Intent; | 10 import android.content.Intent; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } | 122 } |
123 | 123 |
124 /** | 124 /** |
125 * Records the current custom tab visibility state with native-side feature
utilities. | 125 * Records the current custom tab visibility state with native-side feature
utilities. |
126 * @param visible Whether a custom tab is visible. | 126 * @param visible Whether a custom tab is visible. |
127 */ | 127 */ |
128 public static void setCustomTabVisible(boolean visible) { | 128 public static void setCustomTabVisible(boolean visible) { |
129 nativeSetCustomTabVisible(visible); | 129 nativeSetCustomTabVisible(visible); |
130 } | 130 } |
131 | 131 |
| 132 /** |
| 133 * @return Whether a custom tab is visible. |
| 134 */ |
| 135 public static boolean getCustomTabVisible() { |
| 136 return nativeGetCustomTabVisible(); |
| 137 } |
| 138 |
132 private static native void nativeSetDocumentModeEnabled(boolean enabled); | 139 private static native void nativeSetDocumentModeEnabled(boolean enabled); |
133 private static native void nativeSetCustomTabVisible(boolean visible); | 140 private static native void nativeSetCustomTabVisible(boolean visible); |
| 141 private static native boolean nativeGetCustomTabVisible(); |
134 } | 142 } |
OLD | NEW |