| 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.content.Context; | 8 import android.content.Context; |
| 9 import android.content.res.Configuration; | 9 import android.content.res.Configuration; |
| 10 import android.graphics.Bitmap; | 10 import android.graphics.Bitmap; |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 */ | 631 */ |
| 632 public void setDownloadDelegate(ContentViewDownloadDelegate delegate) { | 632 public void setDownloadDelegate(ContentViewDownloadDelegate delegate) { |
| 633 mContentViewCore.setDownloadDelegate(delegate); | 633 mContentViewCore.setDownloadDelegate(delegate); |
| 634 } | 634 } |
| 635 | 635 |
| 636 // Called by DownloadController. | 636 // Called by DownloadController. |
| 637 ContentViewDownloadDelegate getDownloadDelegate() { | 637 ContentViewDownloadDelegate getDownloadDelegate() { |
| 638 return mContentViewCore.getDownloadDelegate(); | 638 return mContentViewCore.getDownloadDelegate(); |
| 639 } | 639 } |
| 640 | 640 |
| 641 public boolean getUseDesktopUserAgent() { | |
| 642 return mContentViewCore.getUseDesktopUserAgent(); | |
| 643 } | |
| 644 | |
| 645 /** | |
| 646 * Set whether or not we're using a desktop user agent for the currently loa
ded page. | |
| 647 * @param override If true, use a desktop user agent. Use a mobile one othe
rwise. | |
| 648 * @param reloadOnChange Reload the page if the UA has changed. | |
| 649 */ | |
| 650 public void setUseDesktopUserAgent(boolean override, boolean reloadOnChange)
{ | |
| 651 mContentViewCore.setUseDesktopUserAgent(override, reloadOnChange); | |
| 652 } | |
| 653 | |
| 654 /** | 641 /** |
| 655 * Zooms in the WebView by 25% (or less if that would result in zooming in | 642 * Zooms in the WebView by 25% (or less if that would result in zooming in |
| 656 * more than possible). | 643 * more than possible). |
| 657 * | 644 * |
| 658 * @return True if there was a zoom change, false otherwise. | 645 * @return True if there was a zoom change, false otherwise. |
| 659 */ | 646 */ |
| 660 // This method uses the term 'zoom' for legacy reasons, but relates | 647 // This method uses the term 'zoom' for legacy reasons, but relates |
| 661 // to what chrome calls the 'page scale factor'. | 648 // to what chrome calls the 'page scale factor'. |
| 662 public boolean zoomIn() { | 649 public boolean zoomIn() { |
| 663 return mContentViewCore.zoomIn(); | 650 return mContentViewCore.zoomIn(); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 | 768 |
| 782 @Override | 769 @Override |
| 783 public boolean super_awakenScrollBars(int startDelay, boolean invalidate) { | 770 public boolean super_awakenScrollBars(int startDelay, boolean invalidate) { |
| 784 return super.awakenScrollBars(startDelay, invalidate); | 771 return super.awakenScrollBars(startDelay, invalidate); |
| 785 } | 772 } |
| 786 | 773 |
| 787 ////////////////////////////////////////////////////////////////////////////
/////////////////// | 774 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 788 // End Implementation of ContentViewCore.InternalAccessDelega
te // | 775 // End Implementation of ContentViewCore.InternalAccessDelega
te // |
| 789 ////////////////////////////////////////////////////////////////////////////
/////////////////// | 776 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 790 } | 777 } |
| OLD | NEW |