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

Side by Side Diff: trunk/src/chrome/browser/extensions/extension_action.cc

Issue 183003011: Revert 254567 "don't create SkDevice directly, use SkBitmap or (..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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/extensions/extension_action.h" 5 #include "chrome/browser/extensions/extension_action.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "chrome/common/badge_util.h" 12 #include "chrome/common/badge_util.h"
13 #include "chrome/common/extensions/extension_constants.h" 13 #include "chrome/common/extensions/extension_constants.h"
14 #include "chrome/common/icon_with_badge_image_source.h" 14 #include "chrome/common/icon_with_badge_image_source.h"
15 #include "grit/theme_resources.h" 15 #include "grit/theme_resources.h"
16 #include "grit/ui_resources.h" 16 #include "grit/ui_resources.h"
17 #include "third_party/skia/include/core/SkBitmap.h" 17 #include "third_party/skia/include/core/SkBitmap.h"
18 #include "third_party/skia/include/core/SkBitmapDevice.h"
18 #include "third_party/skia/include/core/SkCanvas.h" 19 #include "third_party/skia/include/core/SkCanvas.h"
19 #include "third_party/skia/include/core/SkPaint.h" 20 #include "third_party/skia/include/core/SkPaint.h"
20 #include "third_party/skia/include/effects/SkGradientShader.h" 21 #include "third_party/skia/include/effects/SkGradientShader.h"
21 #include "ui/base/resource/resource_bundle.h" 22 #include "ui/base/resource/resource_bundle.h"
22 #include "ui/gfx/animation/animation_delegate.h" 23 #include "ui/gfx/animation/animation_delegate.h"
23 #include "ui/gfx/canvas.h" 24 #include "ui/gfx/canvas.h"
24 #include "ui/gfx/color_utils.h" 25 #include "ui/gfx/color_utils.h"
25 #include "ui/gfx/image/image.h" 26 #include "ui/gfx/image/image.h"
26 #include "ui/gfx/image/image_skia.h" 27 #include "ui/gfx/image/image_skia.h"
27 #include "ui/gfx/image/image_skia_source.h" 28 #include "ui/gfx/image/image_skia_source.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // If there is a default icon, the icon width will be set depending on our 215 // If there is a default icon, the icon width will be set depending on our
215 // action type. 216 // action type.
216 if (default_icon_) 217 if (default_icon_)
217 return GetIconSizeForType(action_type()); 218 return GetIconSizeForType(action_type());
218 219
219 // If no icon has been set and there is no default icon, we need favicon 220 // If no icon has been set and there is no default icon, we need favicon
220 // width. 221 // width.
221 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( 222 return ui::ResourceBundle::GetSharedInstance().GetImageNamed(
222 IDR_EXTENSIONS_FAVICON).ToImageSkia()->width(); 223 IDR_EXTENSIONS_FAVICON).ToImageSkia()->width();
223 } 224 }
OLDNEW
« no previous file with comments | « trunk/src/cc/resources/resource_provider.cc ('k') | trunk/src/content/browser/compositor/software_output_device_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698