summaryrefslogtreecommitdiffstats
path: root/ash/shell
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-20 21:54:52 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-20 21:54:52 +0000
commitd24adc83e7de8b042739c96f37588dee5ba091b3 (patch)
treee82cf26051eb22ce33a61a3f2816c39e6135675f /ash/shell
parentfc28c977a4969a3ff4c4e8dee98fe67ce111ed86 (diff)
downloadchromium_src-d24adc83e7de8b042739c96f37588dee5ba091b3.zip
chromium_src-d24adc83e7de8b042739c96f37588dee5ba091b3.tar.gz
chromium_src-d24adc83e7de8b042739c96f37588dee5ba091b3.tar.bz2
Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx"
> Remove dependency on ui::ScaleFactor from ui/gfx > > As part of the work to removed dependencies on ui/base from ui/gfx I have > changed the public api to Canvas, ImageSkia, ImageSkiaRep and ImagePNGRep > to take float scale values instead of ui::ScaleFactor. > > The notion of supported scale factors has been broken into 2 parts. > ui::SetSupportedScaleFactors remains and calls the > new ImageSkia::SetSupportedScales(). > > The initialization of the supported scale factors has been moved from layout.h > into ResourceBundle, and is done explicitly in tests that don't use > ResourceBundle. > > BUG=103304 > R=ben@chromium.org, oshima@chromium.org, sky@chromium.org > > Review URL: https://codereview.chromium.org/24175004 TBR=davemoore@chromium.org Review URL: https://codereview.chromium.org/24262008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell')
-rw-r--r--ash/shell/app_list.cc3
-rw-r--r--ash/shell/window_watcher.cc3
2 files changed, 4 insertions, 2 deletions
diff --git a/ash/shell/app_list.cc b/ash/shell/app_list.cc
index 25306b3..f0dae34 100644
--- a/ash/shell/app_list.cc
+++ b/ash/shell/app_list.cc
@@ -204,7 +204,8 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate {
const base::string16 icon_text = ASCIIToUTF16("ash");
const gfx::Size icon_size(32, 32);
- gfx::Canvas canvas(icon_size, 1.0f, false /* is_opaque */);
+ gfx::Canvas canvas(icon_size, ui::SCALE_FACTOR_100P,
+ false /* is_opaque */);
canvas.DrawStringInt(icon_text,
gfx::Font(),
SK_ColorBLACK,
diff --git a/ash/shell/window_watcher.cc b/ash/shell/window_watcher.cc
index f076483..4dfcea4 100644
--- a/ash/shell/window_watcher.cc
+++ b/ash/shell/window_watcher.cc
@@ -118,7 +118,8 @@ void WindowWatcher::OnWindowAdded(aura::Window* new_window) {
image_count == 1 ? 255 : 0,
image_count == 2 ? 255 : 0);
image_count = (image_count + 1) % 3;
- item.image = gfx::ImageSkia(gfx::ImageSkiaRep(icon_bitmap, 1.0f));
+ item.image = gfx::ImageSkia(gfx::ImageSkiaRep(icon_bitmap,
+ ui::SCALE_FACTOR_100P));
model->Add(item);
}