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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 628763003: Support InputRouter recycling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 6 years, 2 months 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 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.app.Activity; 8 import android.app.Activity;
9 import android.app.SearchManager; 9 import android.app.SearchManager;
10 import android.content.ClipboardManager; 10 import android.content.ClipboardManager;
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 mImeAdapter = createImeAdapter(mContext); 627 mImeAdapter = createImeAdapter(mContext);
628 628
629 mAccessibilityInjector = AccessibilityInjector.newInstance(this); 629 mAccessibilityInjector = AccessibilityInjector.newInstance(this);
630 630
631 mWebContentsObserver = new WebContentsObserverAndroid(mWebContents) { 631 mWebContentsObserver = new WebContentsObserverAndroid(mWebContents) {
632 @Override 632 @Override
633 public void didNavigateMainFrame(String url, String baseUrl, 633 public void didNavigateMainFrame(String url, String baseUrl,
634 boolean isNavigationToDifferentPage, boolean isFragmentNavig ation) { 634 boolean isNavigationToDifferentPage, boolean isFragmentNavig ation) {
635 if (!isNavigationToDifferentPage) return; 635 if (!isNavigationToDifferentPage) return;
636 hidePopupsAndClearSelection(); 636 hidePopupsAndClearSelection();
637 resetScrollInProgress();
638 resetGestureDetection(); 637 resetGestureDetection();
639 } 638 }
640 639
641 @Override 640 @Override
642 public void renderProcessGone(boolean wasOomProtected) { 641 public void renderProcessGone(boolean wasOomProtected) {
643 hidePopupsAndClearSelection(); 642 hidePopupsAndClearSelection();
644 resetScrollInProgress(); 643 resetScrollInProgress();
645 // No need to reset gesture detection as the detector will have 644 // No need to reset gesture detection as the detector will have
646 // been destroyed in the RenderWidgetHostView. 645 // been destroyed in the RenderWidgetHostView.
647 } 646 }
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 if (mActionMode != null) { 1259 if (mActionMode != null) {
1261 mActionMode.finish(); 1260 mActionMode.finish();
1262 mActionMode = null; 1261 mActionMode = null;
1263 } 1262 }
1264 } 1263 }
1265 1264
1266 public boolean isSelectActionBarShowing() { 1265 public boolean isSelectActionBarShowing() {
1267 return mActionMode != null; 1266 return mActionMode != null;
1268 } 1267 }
1269 1268
1270 private void resetGestureDetection() { 1269 private void resetGestureDetection() {
jdduke (slow) 2014/12/20 01:12:17 Should probably rename this to |resetInputStream()
1271 if (mNativeContentViewCore == 0) return; 1270 if (mNativeContentViewCore != 0) nativeResetGestureDetection(mNativeCont entViewCore);
1272 nativeResetGestureDetection(mNativeContentViewCore); 1271 resetScrollInProgress();
1273 } 1272 }
1274 1273
1275 /** 1274 /**
1276 * @see View#onAttachedToWindow() 1275 * @see View#onAttachedToWindow()
1277 */ 1276 */
1278 @SuppressWarnings("javadoc") 1277 @SuppressWarnings("javadoc")
1279 public void onAttachedToWindow() { 1278 public void onAttachedToWindow() {
1280 setAccessibilityState(mAccessibilityManager.isEnabled()); 1279 setAccessibilityState(mAccessibilityManager.isEnabled());
1281 restoreSelectionPopupsIfNecessary(); 1280 restoreSelectionPopupsIfNecessary();
1282 ScreenOrientationListener.getInstance().addObserver(this, mContext); 1281 ScreenOrientationListener.getInstance().addObserver(this, mContext);
(...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2931 private native void nativeWasResized(long nativeContentViewCoreImpl); 2930 private native void nativeWasResized(long nativeContentViewCoreImpl);
2932 2931
2933 private native void nativeSetAccessibilityEnabled( 2932 private native void nativeSetAccessibilityEnabled(
2934 long nativeContentViewCoreImpl, boolean enabled); 2933 long nativeContentViewCoreImpl, boolean enabled);
2935 2934
2936 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, 2935 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l,
2937 int x, int y, int w, int h); 2936 int x, int y, int w, int h);
2938 2937
2939 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); 2938 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque);
2940 } 2939 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698