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 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2454 destroyContentViewCore(deleteOldNativeWebContents); | 2454 destroyContentViewCore(deleteOldNativeWebContents); |
2455 NativePage previousNativePage = mNativePage; | 2455 NativePage previousNativePage = mNativePage; |
2456 mNativePage = null; | 2456 mNativePage = null; |
2457 // Size of the new ContentViewCore is zero at this point. If we don't ca
ll onSizeChanged(), | 2457 // Size of the new ContentViewCore is zero at this point. If we don't ca
ll onSizeChanged(), |
2458 // next onShow() call would send a resize message with the current Conte
ntViewCore size | 2458 // next onShow() call would send a resize message with the current Conte
ntViewCore size |
2459 // (zero) to the renderer process, although the new size will be set soo
n. | 2459 // (zero) to the renderer process, although the new size will be set soo
n. |
2460 // However, this size fluttering may confuse Blink and rendered result c
an be broken | 2460 // However, this size fluttering may confuse Blink and rendered result c
an be broken |
2461 // (see http://crbug.com/340987). | 2461 // (see http://crbug.com/340987). |
2462 newContentViewCore.onSizeChanged(originalWidth, originalHeight, 0, 0); | 2462 newContentViewCore.onSizeChanged(originalWidth, originalHeight, 0, 0); |
2463 if (!bounds.isEmpty()) { | 2463 if (!bounds.isEmpty()) { |
2464 newContentViewCore.getWindowAndroid().getViewRoot().onPhysicalBackin
gSizeChanged( | 2464 newContentViewCore.onPhysicalBackingSizeChanged(bounds.right, bounds
.bottom); |
2465 bounds.right, bounds.bottom); | |
2466 } | 2465 } |
2467 newContentViewCore.onShow(); | 2466 newContentViewCore.onShow(); |
2468 setContentViewCore(newContentViewCore); | 2467 setContentViewCore(newContentViewCore); |
2469 | 2468 |
2470 mContentViewCore.attachImeAdapter(); | 2469 mContentViewCore.attachImeAdapter(); |
2471 | 2470 |
2472 // If the URL has already committed (e.g. prerendering), tell process ma
nagement logic that | 2471 // If the URL has already committed (e.g. prerendering), tell process ma
nagement logic that |
2473 // it can rely on the process visibility signal for binding management. | 2472 // it can rely on the process visibility signal for binding management. |
2474 // TODO: Call ChildProcessLauncher#determinedVisibility() at a more intu
itive time. | 2473 // TODO: Call ChildProcessLauncher#determinedVisibility() at a more intu
itive time. |
2475 // See crbug.com/537671 | 2474 // See crbug.com/537671 |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3200 private native void nativeLoadOriginalImage(long nativeTabAndroid); | 3199 private native void nativeLoadOriginalImage(long nativeTabAndroid); |
3201 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); | 3200 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); |
3202 private native boolean nativeIsOfflinePage(long nativeTabAndroid); | 3201 private native boolean nativeIsOfflinePage(long nativeTabAndroid); |
3203 private native OfflinePageItem nativeGetOfflinePage(long nativeTabAndroid); | 3202 private native OfflinePageItem nativeGetOfflinePage(long nativeTabAndroid); |
3204 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, | 3203 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, |
3205 InterceptNavigationDelegate delegate); | 3204 InterceptNavigationDelegate delegate); |
3206 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 3205 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
3207 TabContentManager tabContentManager); | 3206 TabContentManager tabContentManager); |
3208 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 3207 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
3209 } | 3208 } |
OLD | NEW |