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

Side by Side Diff: chrome/browser/web_applications/web_app_mac.mm

Issue 382623002: SkBitmap::Config is no more, use SkColorType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missed some for chromeos and win Created 6 years, 5 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 #import "chrome/browser/web_applications/web_app_mac.h" 5 #import "chrome/browser/web_applications/web_app_mac.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 } 104 }
105 105
106 // Adds |image| to |icon_family|. Returns true on success, false on failure. 106 // Adds |image| to |icon_family|. Returns true on success, false on failure.
107 bool AddGfxImageToIconFamily(IconFamilyHandle icon_family, 107 bool AddGfxImageToIconFamily(IconFamilyHandle icon_family,
108 const gfx::Image& image) { 108 const gfx::Image& image) {
109 // When called via ShowCreateChromeAppShortcutsDialog the ImageFamily will 109 // When called via ShowCreateChromeAppShortcutsDialog the ImageFamily will
110 // have all the representations desired here for mac, from the kDesiredSizes 110 // have all the representations desired here for mac, from the kDesiredSizes
111 // array in web_app.cc. 111 // array in web_app.cc.
112 SkBitmap bitmap = image.AsBitmap(); 112 SkBitmap bitmap = image.AsBitmap();
113 if (bitmap.config() != SkBitmap::kARGB_8888_Config || 113 if (bitmap.colorType() != kN32_SkColorType ||
114 bitmap.width() != bitmap.height()) { 114 bitmap.width() != bitmap.height()) {
115 return false; 115 return false;
116 } 116 }
117 117
118 OSType icon_type; 118 OSType icon_type;
119 switch (bitmap.width()) { 119 switch (bitmap.width()) {
120 case 512: 120 case 512:
121 icon_type = kIconServices512PixelDataARGB; 121 icon_type = kIconServices512PixelDataARGB;
122 break; 122 break;
123 case 256: 123 case 256:
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 web_app::GetShortcutInfoForApp( 1103 web_app::GetShortcutInfoForApp(
1104 app, 1104 app,
1105 profile, 1105 profile,
1106 base::Bind(&web_app::CreateAppShortcutInfoLoaded, 1106 base::Bind(&web_app::CreateAppShortcutInfoLoaded,
1107 profile, 1107 profile,
1108 app, 1108 app,
1109 close_callback)); 1109 close_callback));
1110 } 1110 }
1111 1111
1112 } // namespace chrome 1112 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/fast_show_pickler.cc ('k') | content/browser/frame_host/navigation_entry_screenshot_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698