| 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" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "ui/base/material_design/material_design_controller.h" | 27 #include "ui/base/material_design/material_design_controller.h" |
| 28 #include "ui/base/resource/resource_bundle.h" | 28 #include "ui/base/resource/resource_bundle.h" |
| 29 #include "ui/gfx/animation/animation_delegate.h" | 29 #include "ui/gfx/animation/animation_delegate.h" |
| 30 #include "ui/gfx/canvas.h" | 30 #include "ui/gfx/canvas.h" |
| 31 #include "ui/gfx/color_utils.h" | 31 #include "ui/gfx/color_utils.h" |
| 32 #include "ui/gfx/geometry/rect.h" | 32 #include "ui/gfx/geometry/rect.h" |
| 33 #include "ui/gfx/geometry/size.h" | 33 #include "ui/gfx/geometry/size.h" |
| 34 #include "ui/gfx/image/image.h" | 34 #include "ui/gfx/image/image.h" |
| 35 #include "ui/gfx/image/image_skia.h" | 35 #include "ui/gfx/image/image_skia.h" |
| 36 #include "ui/gfx/image/image_skia_source.h" | 36 #include "ui/gfx/image/image_skia_source.h" |
| 37 #include "ui/gfx/ipc/gfx_param_traits.h" | 37 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" |
| 38 #include "ui/gfx/skbitmap_operations.h" | 38 #include "ui/gfx/skbitmap_operations.h" |
| 39 #include "url/gurl.h" | 39 #include "url/gurl.h" |
| 40 | 40 |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 // Returns the default icon image for extensions. | 43 // Returns the default icon image for extensions. |
| 44 gfx::Image GetDefaultIcon() { | 44 gfx::Image GetDefaultIcon() { |
| 45 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 45 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 46 IDR_EXTENSIONS_FAVICON); | 46 IDR_EXTENSIONS_FAVICON); |
| 47 } | 47 } |
| (...skipping 278 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 | 326 // If there is a default icon, the icon width will be set depending on our |
| 327 // action type. | 327 // action type. |
| 328 if (default_icon_) | 328 if (default_icon_) |
| 329 return ActionIconSize(); | 329 return ActionIconSize(); |
| 330 | 330 |
| 331 // If no icon has been set and there is no default icon, we need favicon | 331 // If no icon has been set and there is no default icon, we need favicon |
| 332 // width. | 332 // width. |
| 333 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 333 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 334 IDR_EXTENSIONS_FAVICON).Width(); | 334 IDR_EXTENSIONS_FAVICON).Width(); |
| 335 } | 335 } |
| OLD | NEW |