| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.content.browser; | 5 package org.chromium.content.browser; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
| 9 import android.app.Activity; | 9 import android.app.Activity; |
| 10 import android.app.SearchManager; | 10 import android.app.SearchManager; |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 public void navigationEntryCommitted() { | 327 public void navigationEntryCommitted() { |
| 328 determinedProcessVisibility(); | 328 determinedProcessVisibility(); |
| 329 } | 329 } |
| 330 | 330 |
| 331 private void resetPopupsAndInput() { | 331 private void resetPopupsAndInput() { |
| 332 ContentViewCore contentViewCore = mWeakContentViewCore.get(); | 332 ContentViewCore contentViewCore = mWeakContentViewCore.get(); |
| 333 if (contentViewCore == null) return; | 333 if (contentViewCore == null) return; |
| 334 contentViewCore.mIsMobileOptimizedHint = false; | 334 contentViewCore.mIsMobileOptimizedHint = false; |
| 335 contentViewCore.hidePopupsAndClearSelection(); | 335 contentViewCore.hidePopupsAndClearSelection(); |
| 336 contentViewCore.resetScrollInProgress(); | 336 contentViewCore.resetScrollInProgress(); |
| 337 contentViewCore.mImeAdapter.reset(); |
| 337 } | 338 } |
| 338 | 339 |
| 339 private void determinedProcessVisibility() { | 340 private void determinedProcessVisibility() { |
| 340 ContentViewCore contentViewCore = mWeakContentViewCore.get(); | 341 ContentViewCore contentViewCore = mWeakContentViewCore.get(); |
| 341 if (contentViewCore == null) return; | 342 if (contentViewCore == null) return; |
| 342 // Signal to the process management logic that we can now rely on th
e process | 343 // Signal to the process management logic that we can now rely on th
e process |
| 343 // visibility signal for binding management. Before the navigation c
ommits, its | 344 // visibility signal for binding management. Before the navigation c
ommits, its |
| 344 // renderer is considered background even if the pending navigation
happens in the | 345 // renderer is considered background even if the pending navigation
happens in the |
| 345 // foreground renderer. | 346 // foreground renderer. |
| 346 ChildProcessLauncher.determinedVisibility(contentViewCore.getCurrent
RenderProcessId()); | 347 ChildProcessLauncher.determinedVisibility(contentViewCore.getCurrent
RenderProcessId()); |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 * onDetachedFromWindow() which is guaranteed to be called in Android WebVie
w. | 928 * onDetachedFromWindow() which is guaranteed to be called in Android WebVie
w. |
| 928 */ | 929 */ |
| 929 public void destroy() { | 930 public void destroy() { |
| 930 if (mNativeContentViewCore != 0) { | 931 if (mNativeContentViewCore != 0) { |
| 931 nativeOnJavaContentViewCoreDestroyed(mNativeContentViewCore); | 932 nativeOnJavaContentViewCoreDestroyed(mNativeContentViewCore); |
| 932 } | 933 } |
| 933 mWebContentsObserver.destroy(); | 934 mWebContentsObserver.destroy(); |
| 934 mWebContentsObserver = null; | 935 mWebContentsObserver = null; |
| 935 setSmartClipDataListener(null); | 936 setSmartClipDataListener(null); |
| 936 setZoomControlsDelegate(null); | 937 setZoomControlsDelegate(null); |
| 938 mImeAdapter.reset(); |
| 937 // TODO(igsolla): address TODO in ContentViewClient because ContentViewC
lient is not | 939 // TODO(igsolla): address TODO in ContentViewClient because ContentViewC
lient is not |
| 938 // currently a real Null Object. | 940 // currently a real Null Object. |
| 939 // | 941 // |
| 940 // Instead of deleting the client we use the Null Object pattern to avoi
d null checks | 942 // Instead of deleting the client we use the Null Object pattern to avoi
d null checks |
| 941 // in this class. | 943 // in this class. |
| 942 mContentViewClient = new ContentViewClient(); | 944 mContentViewClient = new ContentViewClient(); |
| 943 mWebContents = null; | 945 mWebContents = null; |
| 944 mOverscrollRefreshHandler = null; | 946 mOverscrollRefreshHandler = null; |
| 945 mNativeContentViewCore = 0; | 947 mNativeContentViewCore = 0; |
| 946 mJavaScriptInterfaces.clear(); | 948 mJavaScriptInterfaces.clear(); |
| (...skipping 2363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3310 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, | 3312 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, |
| 3311 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, | 3313 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, |
| 3312 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, | 3314 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, |
| 3313 String textTrackTextShadow, String textTrackTextSize); | 3315 String textTrackTextShadow, String textTrackTextSize); |
| 3314 | 3316 |
| 3315 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3317 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
| 3316 int x, int y, int w, int h); | 3318 int x, int y, int w, int h); |
| 3317 | 3319 |
| 3318 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3320 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
| 3319 } | 3321 } |
| OLD | NEW |