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 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1489 } | 1489 } |
1490 | 1490 |
1491 @Override | 1491 @Override |
1492 public boolean didUIStealScroll(float x, float y) { | 1492 public boolean didUIStealScroll(float x, float y) { |
1493 return getContentViewClient().shouldOverrideScroll( | 1493 return getContentViewClient().shouldOverrideScroll( |
1494 x, y, computeHorizontalScrollOffset(), computeVerticalScrollOffs
et()); | 1494 x, y, computeHorizontalScrollOffset(), computeVerticalScrollOffs
et()); |
1495 } | 1495 } |
1496 | 1496 |
1497 private void onRenderCoordinatesUpdated() { | 1497 private void onRenderCoordinatesUpdated() { |
1498 if (mContentViewGestureHandler == null) return; | 1498 if (mContentViewGestureHandler == null) return; |
1499 mContentViewGestureHandler.updateHasFixedPageScale(mRenderCoordinates.ha
sFixedPageScale()); | 1499 |
| 1500 // We disable double tap zoom for pages that have a width=device-width |
| 1501 // or narrower viewport (indicating that this is a mobile-optimized or |
| 1502 // responsive web design, so text will be legible without zooming). |
| 1503 // We also disable it for pages that disallow the user from zooming in |
| 1504 // or out (even if they don't have a device-width or narrower viewport). |
| 1505 mContentViewGestureHandler.updateShouldDisableDoubleTap( |
| 1506 mRenderCoordinates.hasMobileViewport() || mRenderCoordinates.has
FixedPageScale()); |
1500 } | 1507 } |
1501 | 1508 |
1502 private void hidePopupDialog() { | 1509 private void hidePopupDialog() { |
1503 SelectPopupDialog.hide(this); | 1510 SelectPopupDialog.hide(this); |
1504 hideHandles(); | 1511 hideHandles(); |
1505 hideSelectActionBar(); | 1512 hideSelectActionBar(); |
1506 } | 1513 } |
1507 | 1514 |
1508 void hideSelectActionBar() { | 1515 void hideSelectActionBar() { |
1509 if (mActionMode != null) { | 1516 if (mActionMode != null) { |
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3362 | 3369 |
3363 private native void nativeAttachExternalVideoSurface( | 3370 private native void nativeAttachExternalVideoSurface( |
3364 int nativeContentViewCoreImpl, int playerId, Surface surface); | 3371 int nativeContentViewCoreImpl, int playerId, Surface surface); |
3365 | 3372 |
3366 private native void nativeDetachExternalVideoSurface( | 3373 private native void nativeDetachExternalVideoSurface( |
3367 int nativeContentViewCoreImpl, int playerId); | 3374 int nativeContentViewCoreImpl, int playerId); |
3368 | 3375 |
3369 private native void nativeSetAccessibilityEnabled( | 3376 private native void nativeSetAccessibilityEnabled( |
3370 int nativeContentViewCoreImpl, boolean enabled); | 3377 int nativeContentViewCoreImpl, boolean enabled); |
3371 } | 3378 } |
OLD | NEW |