diff options
author | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-31 18:06:41 +0000 |
---|---|---|
committer | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-31 18:06:41 +0000 |
commit | 421ce19f234e368c674b1e31318cfbb8a222e33b (patch) | |
tree | b24e41b13977a7041baaf8eaeb97934bb21feef8 /ui/base/layout.cc | |
parent | 45bd8927682e1ad991638755e4233f7e2a9bed16 (diff) | |
download | chromium_src-421ce19f234e368c674b1e31318cfbb8a222e33b.zip chromium_src-421ce19f234e368c674b1e31318cfbb8a222e33b.tar.gz chromium_src-421ce19f234e368c674b1e31318cfbb8a222e33b.tar.bz2 |
Lookup the favicon with the closest scale factor to the one passed in to chrome://touch-icon URL
This allows Android to use window.devicePixelRatio with chrome://touch-icon
Bug=172048
Test=WebUIUtilTest.ParsePathAndScale
Review URL: https://chromiumcodereview.appspot.com/12041064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179907 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/layout.cc')
-rw-r--r-- | ui/base/layout.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/base/layout.cc b/ui/base/layout.cc index 66d44f1..1c7c667 100644 --- a/ui/base/layout.cc +++ b/ui/base/layout.cc @@ -203,6 +203,16 @@ void SetSupportedScaleFactors( ScaleFactorComparator); } +ScopedSetSupportedScaleFactors::ScopedSetSupportedScaleFactors( + const std::vector<ui::ScaleFactor>& new_scale_factors) + : original_scale_factors_(GetSupportedScaleFactors()) { + SetSupportedScaleFactors(new_scale_factors); +} + +ScopedSetSupportedScaleFactors::~ScopedSetSupportedScaleFactors() { + SetSupportedScaleFactors(original_scale_factors_); +} + } // namespace test #if !defined(OS_MACOSX) |