Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 2528823002: Separate SwipeRefreshHandler and ContentViewCore (Closed)
Patch Set: boliu's requested changes + some lint fixes Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 if (mInfoBarContainer == null) { 1788 if (mInfoBarContainer == null) {
1789 // The InfoBarContainer needs to be created after the ContentVie w has been natively 1789 // The InfoBarContainer needs to be created after the ContentVie w has been natively
1790 // initialized. 1790 // initialized.
1791 mInfoBarContainer = new InfoBarContainer( 1791 mInfoBarContainer = new InfoBarContainer(
1792 mThemedApplicationContext, getId(), mContentViewParent, this); 1792 mThemedApplicationContext, getId(), mContentViewParent, this);
1793 } else { 1793 } else {
1794 mInfoBarContainer.onParentViewChanged(getId(), mContentViewParen t); 1794 mInfoBarContainer.onParentViewChanged(getId(), mContentViewParen t);
1795 } 1795 }
1796 mInfoBarContainer.setContentViewCore(mContentViewCore); 1796 mInfoBarContainer.setContentViewCore(mContentViewCore);
1797 1797
1798 mSwipeRefreshHandler = new SwipeRefreshHandler(mThemedApplicationCon text, this); 1798 mSwipeRefreshHandler = new SwipeRefreshHandler(
1799 mThemedApplicationContext, this, mContentViewCore.getWebCont ents());
1799 1800
1800 updateThemeColorIfNeeded(false); 1801 updateThemeColorIfNeeded(false);
1801 notifyContentChanged(); 1802 notifyContentChanged();
1802 1803
1803 // For browser tabs, we want to set accessibility focus to the page 1804 // For browser tabs, we want to set accessibility focus to the page
1804 // when it loads. This is not the default behavior for embedded 1805 // when it loads. This is not the default behavior for embedded
1805 // web views. 1806 // web views.
1806 mContentViewCore.setShouldSetAccessibilityFocusOnPageLoad(true); 1807 mContentViewCore.setShouldSetAccessibilityFocusOnPageLoad(true);
1807 1808
1808 setInterceptNavigationDelegate(mDelegateFactory.createInterceptNavig ationDelegate( 1809 setInterceptNavigationDelegate(mDelegateFactory.createInterceptNavig ationDelegate(
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
3199 private native void nativeLoadOriginalImage(long nativeTabAndroid); 3200 private native void nativeLoadOriginalImage(long nativeTabAndroid);
3200 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE ditable); 3201 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE ditable);
3201 private native boolean nativeIsOfflinePage(long nativeTabAndroid); 3202 private native boolean nativeIsOfflinePage(long nativeTabAndroid);
3202 private native OfflinePageItem nativeGetOfflinePage(long nativeTabAndroid); 3203 private native OfflinePageItem nativeGetOfflinePage(long nativeTabAndroid);
3203 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro id, 3204 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro id,
3204 InterceptNavigationDelegate delegate); 3205 InterceptNavigationDelegate delegate);
3205 private native void nativeAttachToTabContentManager(long nativeTabAndroid, 3206 private native void nativeAttachToTabContentManager(long nativeTabAndroid,
3206 TabContentManager tabContentManager); 3207 TabContentManager tabContentManager);
3207 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url); 3208 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url);
3208 } 3209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698