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.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.Intent; | 9 import android.content.Intent; |
10 import android.content.res.Resources; | 10 import android.content.res.Resources; |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 private void restoreFieldsFromState(TabState state) { | 668 private void restoreFieldsFromState(TabState state) { |
669 assert state != null; | 669 assert state != null; |
670 mAppAssociatedWith = state.openerAppId; | 670 mAppAssociatedWith = state.openerAppId; |
671 mFrozenContentsState = state.contentsState; | 671 mFrozenContentsState = state.contentsState; |
672 mSyncId = (int) state.syncId; | 672 mSyncId = (int) state.syncId; |
673 mShouldPreserve = state.shouldPreserve; | 673 mShouldPreserve = state.shouldPreserve; |
674 mTimestampMillis = state.timestampMillis; | 674 mTimestampMillis = state.timestampMillis; |
675 mUrl = state.getVirtualUrlFromState(); | 675 mUrl = state.getVirtualUrlFromState(); |
676 | 676 |
677 mTitle = state.getDisplayTitleFromState(); | 677 mTitle = state.getDisplayTitleFromState(); |
678 mIsTitleDirectionRtl = LocalizationUtils.getFirstStrongCharacterDirectio
n(mTitle) | 678 mIsTitleDirectionRtl = mTitle != null |
679 == LocalizationUtils.RIGHT_TO_LEFT; | 679 && LocalizationUtils.getFirstStrongCharacterDirection(mTitle) |
| 680 == LocalizationUtils.RIGHT_TO_LEFT; |
680 } | 681 } |
681 | 682 |
682 /** | 683 /** |
683 * Adds a {@link TabObserver} to be notified on {@link Tab} changes. | 684 * Adds a {@link TabObserver} to be notified on {@link Tab} changes. |
684 * @param observer The {@link TabObserver} to add. | 685 * @param observer The {@link TabObserver} to add. |
685 */ | 686 */ |
686 public void addObserver(TabObserver observer) { | 687 public void addObserver(TabObserver observer) { |
687 mObservers.addObserver(observer); | 688 mObservers.addObserver(observer); |
688 } | 689 } |
689 | 690 |
(...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3065 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, | 3066 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, |
3066 InterceptNavigationDelegate delegate); | 3067 InterceptNavigationDelegate delegate); |
3067 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 3068 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
3068 TabContentManager tabContentManager); | 3069 TabContentManager tabContentManager); |
3069 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, | 3070 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, |
3070 ContentViewCore content, boolean visible); | 3071 ContentViewCore content, boolean visible); |
3071 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, | 3072 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, |
3072 ContentViewCore content); | 3073 ContentViewCore content); |
3073 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 3074 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
3074 } | 3075 } |
OLD | NEW |