| 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.content.Context; | 7 import android.content.Context; |
| 8 import android.content.res.Configuration; | 8 import android.content.res.Configuration; |
| 9 import android.graphics.Rect; | 9 import android.graphics.Rect; |
| 10 import android.os.Build; | 10 import android.os.Build; |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 291 |
| 292 @Override | 292 @Override |
| 293 protected void onDetachedFromWindow() { | 293 protected void onDetachedFromWindow() { |
| 294 super.onDetachedFromWindow(); | 294 super.onDetachedFromWindow(); |
| 295 mContentViewCore.onDetachedFromWindow(); | 295 mContentViewCore.onDetachedFromWindow(); |
| 296 } | 296 } |
| 297 | 297 |
| 298 // Implements SmartClipProvider | 298 // Implements SmartClipProvider |
| 299 @Override | 299 @Override |
| 300 public void extractSmartClipData(int x, int y, int width, int height) { | 300 public void extractSmartClipData(int x, int y, int width, int height) { |
| 301 float dpi = mContentViewCore.getRenderCoordinates().getDeviceScaleFactor
(); | |
| 302 y -= mContentViewCore.getRenderCoordinates().getContentOffsetYPix(); | |
| 303 mContentViewCore.getWebContents().requestSmartClipExtract( | 301 mContentViewCore.getWebContents().requestSmartClipExtract( |
| 304 (int) (x / dpi), (int) (y / dpi), (int) (width / dpi), (int) (he
ight / dpi)); | 302 x, y, width, height, mContentViewCore.getRenderCoordinates()); |
| 305 } | 303 } |
| 306 | 304 |
| 307 // Implements SmartClipProvider | 305 // Implements SmartClipProvider |
| 308 @Override | 306 @Override |
| 309 public void setSmartClipResultHandler(final Handler resultHandler) { | 307 public void setSmartClipResultHandler(final Handler resultHandler) { |
| 310 mContentViewCore.getWebContents().setSmartClipResultHandler(resultHandle
r); | 308 mContentViewCore.getWebContents().setSmartClipResultHandler(resultHandle
r); |
| 311 } | 309 } |
| 312 | 310 |
| 313 ////////////////////////////////////////////////////////////////////////////
/////////////////// | 311 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 314 // Start Implementation of ContentViewCore.InternalAccessDelega
te // | 312 // Start Implementation of ContentViewCore.InternalAccessDelega
te // |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 public ContentViewApi23(Context context, ContentViewCore cvc) { | 345 public ContentViewApi23(Context context, ContentViewCore cvc) { |
| 348 super(context, cvc); | 346 super(context, cvc); |
| 349 } | 347 } |
| 350 | 348 |
| 351 @Override | 349 @Override |
| 352 public void onProvideVirtualStructure(final ViewStructure structure) { | 350 public void onProvideVirtualStructure(final ViewStructure structure) { |
| 353 mContentViewCore.onProvideVirtualStructure(structure, false); | 351 mContentViewCore.onProvideVirtualStructure(structure, false); |
| 354 } | 352 } |
| 355 } | 353 } |
| 356 } | 354 } |
| OLD | NEW |