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.tab; | 5 package org.chromium.chrome.browser.tab; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.app.Application; | 9 import android.app.Application; |
10 import android.content.Context; | 10 import android.content.Context; |
(...skipping 2491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2502 | 2502 |
2503 /** | 2503 /** |
2504 * Toggles fullscreen mode and notifies all observers. | 2504 * Toggles fullscreen mode and notifies all observers. |
2505 * @param enableFullscreen Whether fullscreen should be enabled. | 2505 * @param enableFullscreen Whether fullscreen should be enabled. |
2506 */ | 2506 */ |
2507 public void toggleFullscreenMode(boolean enableFullscreen) { | 2507 public void toggleFullscreenMode(boolean enableFullscreen) { |
2508 if (mFullscreenManager != null) { | 2508 if (mFullscreenManager != null) { |
2509 mFullscreenManager.setPersistentFullscreenMode(enableFullscreen); | 2509 mFullscreenManager.setPersistentFullscreenMode(enableFullscreen); |
2510 } | 2510 } |
2511 | 2511 |
| 2512 // When going into fullscreen, we want to remove any cached thumbnail of
the Tab. |
| 2513 if (enableFullscreen && mNativeTabAndroid != 0) { |
| 2514 nativeClearThumbnailPlaceholder(mNativeTabAndroid); |
| 2515 } |
| 2516 |
2512 RewindableIterator<TabObserver> observers = getTabObservers(); | 2517 RewindableIterator<TabObserver> observers = getTabObservers(); |
2513 while (observers.hasNext()) { | 2518 while (observers.hasNext()) { |
2514 observers.next().onToggleFullscreenMode(this, enableFullscreen); | 2519 observers.next().onToggleFullscreenMode(this, enableFullscreen); |
2515 } | 2520 } |
2516 } | 2521 } |
2517 | 2522 |
2518 /** | 2523 /** |
2519 * Called when offset values related with fullscreen functionality has been
changed by the | 2524 * Called when offset values related with fullscreen functionality has been
changed by the |
2520 * compositor. | 2525 * compositor. |
2521 * @param topControlsOffsetY The Y offset of the top controls in physical pi
xels. | 2526 * @param topControlsOffsetY The Y offset of the top controls in physical pi
xels. |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3126 private native Bitmap nativeGetFavicon(long nativeTabAndroid); | 3131 private native Bitmap nativeGetFavicon(long nativeTabAndroid); |
3127 private native void nativeCreateHistoricalTab(long nativeTabAndroid); | 3132 private native void nativeCreateHistoricalTab(long nativeTabAndroid); |
3128 private native void nativeUpdateBrowserControlsState( | 3133 private native void nativeUpdateBrowserControlsState( |
3129 long nativeTabAndroid, int constraints, int current, boolean animate
); | 3134 long nativeTabAndroid, int constraints, int current, boolean animate
); |
3130 private native void nativeLoadOriginalImage(long nativeTabAndroid); | 3135 private native void nativeLoadOriginalImage(long nativeTabAndroid); |
3131 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); | 3136 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); |
3132 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, | 3137 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, |
3133 InterceptNavigationDelegate delegate); | 3138 InterceptNavigationDelegate delegate); |
3134 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 3139 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
3135 TabContentManager tabContentManager); | 3140 TabContentManager tabContentManager); |
| 3141 private native void nativeClearThumbnailPlaceholder(long nativeTabAndroid); |
3136 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 3142 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
3137 private native void nativeSetWebappManifestScope(long nativeTabAndroid, Stri
ng scope); | 3143 private native void nativeSetWebappManifestScope(long nativeTabAndroid, Stri
ng scope); |
3138 private native void nativeEnableEmbeddedMediaExperience(long nativeTabAndroi
d, boolean enabled); | 3144 private native void nativeEnableEmbeddedMediaExperience(long nativeTabAndroi
d, boolean enabled); |
3139 private native void nativeAttachDetachedTab(long nativeTabAndroid); | 3145 private native void nativeAttachDetachedTab(long nativeTabAndroid); |
3140 } | 3146 } |
OLD | NEW |