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

Unified Diff: chrome/browser/cocoa/cocoa_utils.mm

Issue 131018: Add favicons to tabs on the Mac (Closed)
Patch Set: Rebase Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/cocoa_utils.h ('k') | chrome/browser/cocoa/cocoa_utils_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/cocoa_utils.mm
diff --git a/chrome/browser/cocoa/cocoa_utils.mm b/chrome/browser/cocoa/cocoa_utils.mm
deleted file mode 100644
index 9c7584d187bcff4d24153465a63c7811c47e2165..0000000000000000000000000000000000000000
--- a/chrome/browser/cocoa/cocoa_utils.mm
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <base/logging.h>
-#include "chrome/browser/cocoa/cocoa_utils.h"
-#import <QuartzCore/CIImage.h>
-#include "third_party/skia/include/utils/mac/SkCGUtils.h"
-#include "third_party/skia/include/core/SkColorPriv.h"
-
-namespace {
-
-// Callback passed to CGDataProviderCreateWithData()
-void ReleaseData(void* info, const void* pixelData, size_t size) {
- // info is a non-const pixelData
- if (info)
- free(info);
-}
-
-}
-
-namespace CocoaUtils {
-
-NSImage* SkBitmapToNSImage(const SkBitmap& skiaBitmap) {
- // First convert SkBitmap to CGImageRef.
- CGImageRef cgimage = SkCreateCGImageRef(skiaBitmap);
-
- // Now convert to NSImage.
- NSBitmapImageRep* bitmap = [[[NSBitmapImageRep alloc]
- initWithCGImage:cgimage] autorelease];
- CFRelease(cgimage);
- NSImage* image = [[[NSImage alloc] init] autorelease];
- [image addRepresentation:bitmap];
- return image;
-}
-
-} // namespace CocoaUtils
-
« no previous file with comments | « chrome/browser/cocoa/cocoa_utils.h ('k') | chrome/browser/cocoa/cocoa_utils_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698