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

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

Issue 832953002: Cleanup: Update the path to gfx size headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 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
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/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "chrome/common/badge_util.h" 13 #include "chrome/common/badge_util.h"
14 #include "chrome/common/icon_with_badge_image_source.h" 14 #include "chrome/common/icon_with_badge_image_source.h"
15 #include "extensions/common/constants.h" 15 #include "extensions/common/constants.h"
16 #include "grit/theme_resources.h" 16 #include "grit/theme_resources.h"
17 #include "grit/ui_resources.h" 17 #include "grit/ui_resources.h"
18 #include "ipc/ipc_message.h" 18 #include "ipc/ipc_message.h"
19 #include "ipc/ipc_message_utils.h" 19 #include "ipc/ipc_message_utils.h"
20 #include "third_party/skia/include/core/SkBitmap.h" 20 #include "third_party/skia/include/core/SkBitmap.h"
21 #include "third_party/skia/include/core/SkCanvas.h" 21 #include "third_party/skia/include/core/SkCanvas.h"
22 #include "third_party/skia/include/core/SkPaint.h" 22 #include "third_party/skia/include/core/SkPaint.h"
23 #include "third_party/skia/include/effects/SkGradientShader.h" 23 #include "third_party/skia/include/effects/SkGradientShader.h"
24 #include "ui/base/resource/resource_bundle.h" 24 #include "ui/base/resource/resource_bundle.h"
25 #include "ui/gfx/animation/animation_delegate.h" 25 #include "ui/gfx/animation/animation_delegate.h"
26 #include "ui/gfx/canvas.h" 26 #include "ui/gfx/canvas.h"
27 #include "ui/gfx/color_utils.h" 27 #include "ui/gfx/color_utils.h"
28 #include "ui/gfx/geometry/rect.h" 28 #include "ui/gfx/geometry/rect.h"
29 #include "ui/gfx/geometry/size.h"
29 #include "ui/gfx/image/image.h" 30 #include "ui/gfx/image/image.h"
30 #include "ui/gfx/image/image_skia.h" 31 #include "ui/gfx/image/image_skia.h"
31 #include "ui/gfx/image/image_skia_source.h" 32 #include "ui/gfx/image/image_skia_source.h"
32 #include "ui/gfx/ipc/gfx_param_traits.h" 33 #include "ui/gfx/ipc/gfx_param_traits.h"
33 #include "ui/gfx/size.h"
34 #include "ui/gfx/skbitmap_operations.h" 34 #include "ui/gfx/skbitmap_operations.h"
35 #include "url/gurl.h" 35 #include "url/gurl.h"
36 36
37 namespace { 37 namespace {
38 38
39 class GetAttentionImageSource : public gfx::ImageSkiaSource { 39 class GetAttentionImageSource : public gfx::ImageSkiaSource {
40 public: 40 public:
41 explicit GetAttentionImageSource(const gfx::ImageSkia& icon) 41 explicit GetAttentionImageSource(const gfx::ImageSkia& icon)
42 : icon_(icon) {} 42 : icon_(icon) {}
43 43
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // If there is a default icon, the icon width will be set depending on our 319 // If there is a default icon, the icon width will be set depending on our
320 // action type. 320 // action type.
321 if (default_icon_) 321 if (default_icon_)
322 return GetIconSizeForType(action_type()); 322 return GetIconSizeForType(action_type());
323 323
324 // If no icon has been set and there is no default icon, we need favicon 324 // If no icon has been set and there is no default icon, we need favicon
325 // width. 325 // width.
326 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( 326 return ui::ResourceBundle::GetSharedInstance().GetImageNamed(
327 IDR_EXTENSIONS_FAVICON).ToImageSkia()->width(); 327 IDR_EXTENSIONS_FAVICON).ToImageSkia()->width();
328 } 328 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/display_info_provider_win.cc ('k') | chrome/browser/extensions/extension_disabled_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698