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

Side by Side Diff: chrome/browser/icon_loader_chromeos.cc

Issue 10916305: Move shared file type images into chrome://theme/ scheme (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android build Created 8 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/browser/icon_loader.h" 5 #include "chrome/browser/icon_loader.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/memory/ref_counted_memory.h" 13 #include "base/memory/ref_counted_memory.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "chrome/browser/icon_loader.h" 15 #include "chrome/browser/icon_loader.h"
16 #include "grit/component_extension_resources.h" 16 #include "grit/theme_resources.h"
17 #include "third_party/skia/include/core/SkBitmap.h" 17 #include "third_party/skia/include/core/SkBitmap.h"
18 #include "ui/base/layout.h" 18 #include "ui/base/layout.h"
19 #include "ui/base/resource/resource_bundle.h" 19 #include "ui/base/resource/resource_bundle.h"
20 #include "ui/gfx/canvas.h" 20 #include "ui/gfx/canvas.h"
21 #include "ui/gfx/codec/png_codec.h" 21 #include "ui/gfx/codec/png_codec.h"
22 #include "ui/gfx/image/image.h" 22 #include "ui/gfx/image/image.h"
23 #include "ui/gfx/image/image_skia.h" 23 #include "ui/gfx/image/image_skia.h"
24 #include "ui/gfx/image/image_skia_operations.h" 24 #include "ui/gfx/image/image_skia_operations.h"
25 #include "webkit/glue/image_decoder.h" 25 #include "webkit/glue/image_decoder.h"
26 26
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 LAZY_INSTANCE_INITIALIZER; 182 LAZY_INSTANCE_INITIALIZER;
183 int idr = icon_mapper.Get().Lookup(group_, icon_size_); 183 int idr = icon_mapper.Get().Lookup(group_, icon_size_);
184 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 184 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
185 gfx::ImageSkia image_skia(ResizeImage(*(rb.GetImageNamed(idr)).ToImageSkia(), 185 gfx::ImageSkia image_skia(ResizeImage(*(rb.GetImageNamed(idr)).ToImageSkia(),
186 IconSizeToDIPSize(icon_size_))); 186 IconSizeToDIPSize(icon_size_)));
187 image_skia.MakeThreadSafe(); 187 image_skia.MakeThreadSafe();
188 image_.reset(new gfx::Image(image_skia)); 188 image_.reset(new gfx::Image(image_skia));
189 target_message_loop_->PostTask( 189 target_message_loop_->PostTask(
190 FROM_HERE, base::Bind(&IconLoader::NotifyDelegate, this)); 190 FROM_HERE, base::Bind(&IconLoader::NotifyDelegate, this));
191 } 191 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/resources/component_extension_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698