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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/favicon_util.mm

Issue 10765021: Make the id used in IconMsg_DownloadFavicon unique (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/tab_contents/favicon_util.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm b/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm
deleted file mode 100644
index f7837400236856425b60b593a679a4cd21367325..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2012 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 "chrome/browser/ui/cocoa/tab_contents/favicon_util.h"
-
-#import <AppKit/AppKit.h>
-
-#include "base/mac/mac_util.h"
-#include "chrome/browser/favicon/favicon_tab_helper.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
-#include "grit/ui_resources.h"
-#include "skia/ext/skia_utils_mac.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/mac/nsimage_cache.h"
-
-namespace mac {
-
-NSImage* FaviconForTabContents(TabContents* contents) {
- if (contents && contents->favicon_tab_helper()->FaviconIsValid()) {
- CGColorSpaceRef color_space = base::mac::GetSystemColorSpace();
- NSImage* image = gfx::SkBitmapToNSImageWithColorSpace(
- contents->favicon_tab_helper()->GetFavicon(), color_space);
- // The |image| could be nil if the bitmap is null. In that case, fallback
- // to the default image.
- if (image) {
- return image;
- }
- }
-
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- return rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON);
-}
-
-} // namespace mac
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/favicon_util.h ('k') | chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698