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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings_bubble_controller.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 #import "chrome/browser/ui/cocoa/website_settings_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/website_settings_bubble_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 scoped_nsobject<NSImage> tabCenterImage_; 125 scoped_nsobject<NSImage> tabCenterImage_;
126 scoped_nsobject<NSImage> tabLeftImage_; 126 scoped_nsobject<NSImage> tabLeftImage_;
127 scoped_nsobject<NSImage> tabRightImage_; 127 scoped_nsobject<NSImage> tabRightImage_;
128 } 128 }
129 @end 129 @end
130 130
131 @implementation WebsiteSettingsTabSegmentedCell 131 @implementation WebsiteSettingsTabSegmentedCell
132 - (id)init { 132 - (id)init {
133 if ((self = [super init])) { 133 if ((self = [super init])) {
134 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 134 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
135 tabBackgroundImage_.reset( 135 tabBackgroundImage_.reset(rb.GetNativeImageNamed(
136 [rb.GetNativeImageNamed(IDR_WEBSITE_SETTINGS_TAB_BACKGROUND) retain]); 136 IDR_WEBSITE_SETTINGS_TAB_BACKGROUND).CopyNSImage());
137 tabCenterImage_.reset( 137 tabCenterImage_.reset(
138 [rb.GetNativeImageNamed(IDR_WEBSITE_SETTINGS_TAB_CENTER) retain]); 138 rb.GetNativeImageNamed(IDR_WEBSITE_SETTINGS_TAB_CENTER).CopyNSImage());
139 tabLeftImage_.reset( 139 tabLeftImage_.reset(
140 [rb.GetNativeImageNamed(IDR_WEBSITE_SETTINGS_TAB_LEFT) retain]); 140 rb.GetNativeImageNamed(IDR_WEBSITE_SETTINGS_TAB_LEFT).CopyNSImage());
141 tabRightImage_.reset( 141 tabRightImage_.reset(
142 [rb.GetNativeImageNamed(IDR_WEBSITE_SETTINGS_TAB_RIGHT) retain]); 142 rb.GetNativeImageNamed(IDR_WEBSITE_SETTINGS_TAB_RIGHT).CopyNSImage());
143 } 143 }
144 return self; 144 return self;
145 } 145 }
146 146
147 - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView { 147 - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
148 // Draw the tab for the selected segment. The drawing area is slightly 148 // Draw the tab for the selected segment. The drawing area is slightly
149 // larger than the hit rect for the tab. 149 // larger than the hit rect for the tab.
150 NSRect tabRect = [self hitRectForSegment:[self selectedSegment]]; 150 NSRect tabRect = [self hitRectForSegment:[self selectedSegment]];
151 tabRect.origin.x -= kTabBorderExtraWidth; 151 tabRect.origin.x -= kTabBorderExtraWidth;
152 tabRect.size.width += 2 * kTabBorderExtraWidth; 152 tabRect.size.width += 2 * kTabBorderExtraWidth;
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 [bubble_controller_ setPermissionInfo:permission_info_list]; 1118 [bubble_controller_ setPermissionInfo:permission_info_list];
1119 } 1119 }
1120 1120
1121 void WebsiteSettingsUIBridge::SetFirstVisit(const string16& first_visit) { 1121 void WebsiteSettingsUIBridge::SetFirstVisit(const string16& first_visit) {
1122 [bubble_controller_ setFirstVisit:first_visit]; 1122 [bubble_controller_ setFirstVisit:first_visit];
1123 } 1123 }
1124 1124
1125 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { 1125 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) {
1126 [bubble_controller_ setSelectedTab:tab_id]; 1126 [bubble_controller_ setSelectedTab:tab_id];
1127 } 1127 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/web_intent_sheet_controller.mm ('k') | chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698