OLD | NEW |
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 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "chrome/grit/theme_resources.h" | 13 #include "chrome/grit/theme_resources.h" |
14 #include "extensions/browser/extension_icon_image.h" | 14 #include "extensions/browser/extension_icon_image.h" |
15 #include "extensions/browser/extension_icon_placeholder.h" | 15 #include "extensions/browser/extension_icon_placeholder.h" |
16 #include "extensions/common/constants.h" | 16 #include "extensions/common/constants.h" |
17 #include "extensions/common/extension_icon_set.h" | 17 #include "extensions/common/extension_icon_set.h" |
18 #include "extensions/common/feature_switch.h" | 18 #include "extensions/common/feature_switch.h" |
19 #include "extensions/common/manifest_handlers/icons_handler.h" | 19 #include "extensions/common/manifest_handlers/icons_handler.h" |
20 #include "grit/ui_resources.h" | |
21 #include "ipc/ipc_message.h" | 20 #include "ipc/ipc_message.h" |
22 #include "ipc/ipc_message_utils.h" | 21 #include "ipc/ipc_message_utils.h" |
23 #include "third_party/skia/include/core/SkBitmap.h" | 22 #include "third_party/skia/include/core/SkBitmap.h" |
24 #include "third_party/skia/include/core/SkCanvas.h" | 23 #include "third_party/skia/include/core/SkCanvas.h" |
25 #include "third_party/skia/include/core/SkPaint.h" | 24 #include "third_party/skia/include/core/SkPaint.h" |
26 #include "third_party/skia/include/effects/SkGradientShader.h" | 25 #include "third_party/skia/include/effects/SkGradientShader.h" |
27 #include "ui/base/material_design/material_design_controller.h" | 26 #include "ui/base/material_design/material_design_controller.h" |
28 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
29 #include "ui/gfx/animation/animation_delegate.h" | 28 #include "ui/gfx/animation/animation_delegate.h" |
30 #include "ui/gfx/canvas.h" | 29 #include "ui/gfx/canvas.h" |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 // If there is a default icon, the icon width will be set depending on our | 325 // If there is a default icon, the icon width will be set depending on our |
327 // action type. | 326 // action type. |
328 if (default_icon_) | 327 if (default_icon_) |
329 return ActionIconSize(); | 328 return ActionIconSize(); |
330 | 329 |
331 // If no icon has been set and there is no default icon, we need favicon | 330 // If no icon has been set and there is no default icon, we need favicon |
332 // width. | 331 // width. |
333 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 332 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
334 IDR_EXTENSIONS_FAVICON).Width(); | 333 IDR_EXTENSIONS_FAVICON).Width(); |
335 } | 334 } |
OLD | NEW |