Chromium Code Reviews| 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.app.Activity; | 7 import android.app.Activity; |
| 8 import android.app.SearchManager; | 8 import android.app.SearchManager; |
| 9 import android.content.ContentResolver; | 9 import android.content.ContentResolver; |
| 10 import android.content.Context; | 10 import android.content.Context; |
| (...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1454 } | 1454 } |
| 1455 | 1455 |
| 1456 @Override | 1456 @Override |
| 1457 public boolean didUIStealScroll(float x, float y) { | 1457 public boolean didUIStealScroll(float x, float y) { |
| 1458 return getContentViewClient().shouldOverrideScroll( | 1458 return getContentViewClient().shouldOverrideScroll( |
| 1459 x, y, computeHorizontalScrollOffset(), computeVerticalScrollOffs et()); | 1459 x, y, computeHorizontalScrollOffset(), computeVerticalScrollOffs et()); |
| 1460 } | 1460 } |
| 1461 | 1461 |
| 1462 private void onRenderCoordinatesUpdated() { | 1462 private void onRenderCoordinatesUpdated() { |
| 1463 if (mContentViewGestureHandler == null) return; | 1463 if (mContentViewGestureHandler == null) return; |
| 1464 mContentViewGestureHandler.updateHasFixedPageScale(mRenderCoordinates.ha sFixedPageScale()); | 1464 |
| 1465 // We disable double tap zoom for pages that have a width=device-width | |
| 1466 // or narrower viewport (indicating that this is a mobile-optimized or | |
| 1467 // responsive web design, so text will be legible without zooming). | |
| 1468 // We also disable it for pages that disallow the user from zooming in | |
| 1469 // or out (even if they don't have a device-width or narrower viewport). | |
| 1470 mContentViewGestureHandler.updateShouldDisableDoubleTap( | |
| 1471 mRenderCoordinates.hasMobileViewport() || mRenderCoordinates.hasFixe dPageScale()); | |
|
Ted C
2013/10/24 19:52:44
+4 indent (and it looks like it will require a lin
johnme
2013/10/31 19:13:12
Done (still fit within 100 chars without line wrap
| |
| 1465 } | 1472 } |
| 1466 | 1473 |
| 1467 private void hidePopupDialog() { | 1474 private void hidePopupDialog() { |
| 1468 SelectPopupDialog.hide(this); | 1475 SelectPopupDialog.hide(this); |
| 1469 hideHandles(); | 1476 hideHandles(); |
| 1470 hideSelectActionBar(); | 1477 hideSelectActionBar(); |
| 1471 } | 1478 } |
| 1472 | 1479 |
| 1473 void hideSelectActionBar() { | 1480 void hideSelectActionBar() { |
| 1474 if (mActionMode != null) { | 1481 if (mActionMode != null) { |
| (...skipping 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3294 | 3301 |
| 3295 private native void nativeAttachExternalVideoSurface( | 3302 private native void nativeAttachExternalVideoSurface( |
| 3296 int nativeContentViewCoreImpl, int playerId, Surface surface); | 3303 int nativeContentViewCoreImpl, int playerId, Surface surface); |
| 3297 | 3304 |
| 3298 private native void nativeDetachExternalVideoSurface( | 3305 private native void nativeDetachExternalVideoSurface( |
| 3299 int nativeContentViewCoreImpl, int playerId); | 3306 int nativeContentViewCoreImpl, int playerId); |
| 3300 | 3307 |
| 3301 private native void nativeSetAccessibilityEnabled( | 3308 private native void nativeSetAccessibilityEnabled( |
| 3302 int nativeContentViewCoreImpl, boolean enabled); | 3309 int nativeContentViewCoreImpl, boolean enabled); |
| 3303 } | 3310 } |
| OLD | NEW |