Have LoadIconFromExtension process icon images

Image processing includes converting to gray (for disabled extensions)
and rounding the corners (for bookmark apps).

BUG=826982

Change-Id: Ie49a8928678abd884302eacb7bef5f2c21e46a35
Reviewed-on: https://chromium-review.googlesource.com/c/1366462
Commit-Queue: Nigel Tao <[email protected]>
Reviewed-by: Devlin <[email protected]>
Reviewed-by: Dominick Ng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#615745}
diff --git a/chrome/browser/extensions/chrome_app_icon.h b/chrome/browser/extensions/chrome_app_icon.h
index 4fbfab2..a083bf3 100644
--- a/chrome/browser/extensions/chrome_app_icon.h
+++ b/chrome/browser/extensions/chrome_app_icon.h
@@ -33,6 +33,15 @@
   using ResizeFunction =
       base::RepeatingCallback<void(const gfx::Size&, gfx::ImageSkia*)>;
 
+  // Applies image processing effects to |image_skia|, such as resizing, adding
+  // badges, converting to gray and rounding corners.
+  static void ApplyEffects(int resource_size_in_dip,
+                           const ResizeFunction& resize_function,
+                           bool apply_chrome_badge,
+                           bool app_launchable,
+                           bool from_bookmark,
+                           gfx::ImageSkia* image_skia);
+
   // |resize_function| overrides icon resizing behavior if non-null. Otherwise
   // IconLoader with perform the resizing. In both cases |resource_size_in_dip|
   // is used to pick the correct icon representation from resources.