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

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

Issue 19602003: Use a direct include of the message_loop header in chrome/browser/, part 7. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 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/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/lazy_instance.h" 13 #include "base/lazy_instance.h"
14 #include "base/memory/ref_counted_memory.h" 14 #include "base/memory/ref_counted_memory.h"
15 #include "base/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "chrome/browser/icon_loader.h" 17 #include "chrome/browser/icon_loader.h"
18 #include "grit/theme_resources.h" 18 #include "grit/theme_resources.h"
19 #include "third_party/skia/include/core/SkBitmap.h" 19 #include "third_party/skia/include/core/SkBitmap.h"
20 #include "ui/base/layout.h" 20 #include "ui/base/layout.h"
21 #include "ui/base/resource/resource_bundle.h" 21 #include "ui/base/resource/resource_bundle.h"
22 #include "ui/gfx/canvas.h" 22 #include "ui/gfx/canvas.h"
23 #include "ui/gfx/codec/png_codec.h" 23 #include "ui/gfx/codec/png_codec.h"
24 #include "ui/gfx/image/image.h" 24 #include "ui/gfx/image/image.h"
25 #include "ui/gfx/image/image_skia.h" 25 #include "ui/gfx/image/image_skia.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 LAZY_INSTANCE_INITIALIZER; 193 LAZY_INSTANCE_INITIALIZER;
194 int idr = icon_mapper.Get().Lookup(group_, icon_size_); 194 int idr = icon_mapper.Get().Lookup(group_, icon_size_);
195 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 195 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
196 gfx::ImageSkia image_skia(ResizeImage(*(rb.GetImageNamed(idr)).ToImageSkia(), 196 gfx::ImageSkia image_skia(ResizeImage(*(rb.GetImageNamed(idr)).ToImageSkia(),
197 IconSizeToDIPSize(icon_size_))); 197 IconSizeToDIPSize(icon_size_)));
198 image_skia.MakeThreadSafe(); 198 image_skia.MakeThreadSafe();
199 image_.reset(new gfx::Image(image_skia)); 199 image_.reset(new gfx::Image(image_skia));
200 target_message_loop_->PostTask( 200 target_message_loop_->PostTask(
201 FROM_HERE, base::Bind(&IconLoader::NotifyDelegate, this)); 201 FROM_HERE, base::Bind(&IconLoader::NotifyDelegate, this));
202 } 202 }
OLDNEW
« no previous file with comments | « chrome/browser/external_protocol/external_protocol_handler_unittest.cc ('k') | chrome/browser/icon_loader_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698