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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm

Issue 480693002: Use a qualified path for ui_resources.h grit includes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 years, 4 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 #include "chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.h" 5 #include "chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.h"
6 6
7 #include "chrome/browser/favicon/favicon_tab_helper.h" 7 #include "chrome/browser/favicon/favicon_tab_helper.h"
8 #include "grit/ui_resources.h"
9 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/resources/grit/ui_resources.h"
10 10
11 namespace mac { 11 namespace mac {
12 12
13 NSImage* FaviconForWebContents(content::WebContents* contents) { 13 NSImage* FaviconForWebContents(content::WebContents* contents) {
14 FaviconTabHelper* favicon_tab_helper = 14 FaviconTabHelper* favicon_tab_helper =
15 contents ? FaviconTabHelper::FromWebContents(contents) 15 contents ? FaviconTabHelper::FromWebContents(contents)
16 : NULL; 16 : NULL;
17 if (favicon_tab_helper && favicon_tab_helper->FaviconIsValid()) { 17 if (favicon_tab_helper && favicon_tab_helper->FaviconIsValid()) {
18 NSImage* image = favicon_tab_helper->GetFavicon().AsNSImage(); 18 NSImage* image = favicon_tab_helper->GetFavicon().AsNSImage();
19 // The |image| could be nil if the bitmap is null. In that case, fallback 19 // The |image| could be nil if the bitmap is null. In that case, fallback
20 // to the default image. 20 // to the default image.
21 if (image) { 21 if (image) {
22 return image; 22 return image;
23 } 23 }
24 } 24 }
25 25
26 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 26 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
27 return rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON).ToNSImage(); 27 return rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON).ToNSImage();
28 } 28 }
29 29
30 } // namespace mac 30 } // namespace mac
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/sprite_view_unittest.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698