Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: ui/base/nine_image_painter_factory.cc

Issue 143953007: Changes look for scrollbars on windows (2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/nine_image_painter_factory.h ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/base/nine_image_painter_factory.h"
6
7 #include "ui/base/resource/resource_bundle.h"
8 #include "ui/gfx/nine_image_painter.h"
9
10 namespace ui {
11
12 namespace {
13
14 std::vector<gfx::ImageSkia> ImageIdsToImages(const int image_ids[]) {
15 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
16 std::vector<gfx::ImageSkia> images(9);
17 for (size_t i = 0; i < 9; ++i) {
18 if (image_ids[i] != 0)
19 images[i] = *rb.GetImageSkiaNamed(image_ids[i]);
20 }
21 return images;
22 }
23
24 } // namespace
25
26 scoped_ptr<gfx::NineImagePainter> CreateNineImagePainter(
27 const int image_ids[]) {
28 return scoped_ptr<gfx::NineImagePainter>(
29 new gfx::NineImagePainter(ImageIdsToImages(image_ids)));
30 }
31
32 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/nine_image_painter_factory.h ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698