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

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

Issue 10933083: Remove deprecated gfx::Image::operator NSImage*(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comments and merge Created 8 years, 3 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
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/sad_tab_view.h" 5 #include "chrome/browser/ui/cocoa/tab_contents/sad_tab_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h" 9 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
10 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h" 10 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
(...skipping 16 matching lines...) Expand all
27 // Padding between message and link. 27 // Padding between message and link.
28 static const CGFloat kMessageLinkSpacing = 15; 28 static const CGFloat kMessageLinkSpacing = 15;
29 // Paddings on left and right of page. 29 // Paddings on left and right of page.
30 static const CGFloat kTabHorzMargin = 13; 30 static const CGFloat kTabHorzMargin = 13;
31 31
32 @implementation SadTabView 32 @implementation SadTabView
33 33
34 - (void)awakeFromNib { 34 - (void)awakeFromNib {
35 // Load resource for image and set it. 35 // Load resource for image and set it.
36 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 36 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
37 NSImage* image = rb.GetNativeImageNamed(IDR_SAD_TAB); 37 NSImage* image = rb.GetNativeImageNamed(IDR_SAD_TAB).ToNSImage();
38 DCHECK(image);
39 [image_ setImage:image]; 38 [image_ setImage:image];
40 39
41 // Set font for title. 40 // Set font for title.
42 NSFont* titleFont = [NSFont boldSystemFontOfSize:[NSFont systemFontSize]]; 41 NSFont* titleFont = [NSFont boldSystemFontOfSize:[NSFont systemFontSize]];
43 [title_ setFont:titleFont]; 42 [title_ setFont:titleFont];
44 43
45 // Set font for message. 44 // Set font for message.
46 NSFont* messageFont = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]; 45 NSFont* messageFont = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]];
47 [message_ setFont:messageFont]; 46 [message_ setFont:messageFont];
48 47
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Called when someone clicks on the embedded link. 162 // Called when someone clicks on the embedded link.
164 - (BOOL)textView:(NSTextView*)textView 163 - (BOOL)textView:(NSTextView*)textView
165 clickedOnLink:(id)link 164 clickedOnLink:(id)link
166 atIndex:(NSUInteger)charIndex { 165 atIndex:(NSUInteger)charIndex {
167 if (controller_) 166 if (controller_)
168 [controller_ openLearnMoreAboutCrashLink:nil]; 167 [controller_ openLearnMoreAboutCrashLink:nil];
169 return YES; 168 return YES;
170 } 169 }
171 170
172 @end 171 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm ('k') | chrome/browser/ui/cocoa/tabpose_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698