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; | 5 package org.chromium.chrome.browser; |
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.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 import android.graphics.Color; | 10 import android.graphics.Color; |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 | 823 |
824 if (AppBannerManager.isEnabled() && mAppBannerManager == null) { | 824 if (AppBannerManager.isEnabled() && mAppBannerManager == null) { |
825 mAppBannerManager = new AppBannerManager(this); | 825 mAppBannerManager = new AppBannerManager(this); |
826 } | 826 } |
827 | 827 |
828 if (DomDistillerFeedbackReporter.isEnabled() && mDomDistillerFeedbackRep
orter == null) { | 828 if (DomDistillerFeedbackReporter.isEnabled() && mDomDistillerFeedbackRep
orter == null) { |
829 mDomDistillerFeedbackReporter = new DomDistillerFeedbackReporter(thi
s); | 829 mDomDistillerFeedbackReporter = new DomDistillerFeedbackReporter(thi
s); |
830 } | 830 } |
831 | 831 |
832 for (TabObserver observer : mObservers) observer.onContentChanged(this); | 832 for (TabObserver observer : mObservers) observer.onContentChanged(this); |
| 833 |
| 834 // For browser tabs, we want to set accessibility focus to the page |
| 835 // when it loads. This is not the default behavior for embedded |
| 836 // web views. |
| 837 mContentViewCore.setShouldSetAccessibilityFocusOnPageLoad(true); |
833 } | 838 } |
834 | 839 |
835 /** | 840 /** |
836 * Cleans up all internal state, destroying any {@link NativePage} or {@link
ContentViewCore} | 841 * Cleans up all internal state, destroying any {@link NativePage} or {@link
ContentViewCore} |
837 * currently associated with this {@link Tab}. This also destroys the nativ
e counterpart | 842 * currently associated with this {@link Tab}. This also destroys the nativ
e counterpart |
838 * to this class, which means that all subclasses should erase their native
pointers after | 843 * to this class, which means that all subclasses should erase their native
pointers after |
839 * this method is called. Once this call is made this {@link Tab} should no
longer be used. | 844 * this method is called. Once this call is made this {@link Tab} should no
longer be used. |
840 */ | 845 */ |
841 public void destroy() { | 846 public void destroy() { |
842 for (TabObserver observer : mObservers) observer.onDestroyed(this); | 847 for (TabObserver observer : mObservers) observer.onDestroyed(this); |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); | 1168 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); |
1164 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, | 1169 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, |
1165 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, | 1170 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, |
1166 boolean isRendererInitiated); | 1171 boolean isRendererInitiated); |
1167 private native int nativeGetSecurityLevel(long nativeTabAndroid); | 1172 private native int nativeGetSecurityLevel(long nativeTabAndroid); |
1168 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, | 1173 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, |
1169 String title); | 1174 String title); |
1170 private native boolean nativePrint(long nativeTabAndroid); | 1175 private native boolean nativePrint(long nativeTabAndroid); |
1171 private native Bitmap nativeGetFavicon(long nativeTabAndroid); | 1176 private native Bitmap nativeGetFavicon(long nativeTabAndroid); |
1172 } | 1177 } |
OLD | NEW |