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

Side by Side Diff: chrome/browser/ui/cocoa/hover_close_button.mm

Issue 12634025: Inconsistent use of [x] close panel icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_173251
Patch Set: Fixed compile on linux, mac and win Created 7 years, 9 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/hover_close_button.h" 5 #import "chrome/browser/ui/cocoa/hover_close_button.h"
6 6
7 #include "base/memory/scoped_nsobject.h" 7 #include "base/memory/scoped_nsobject.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #import "chrome/browser/ui/cocoa/animation_utils.h" 9 #import "chrome/browser/ui/cocoa/animation_utils.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 break; 153 break;
154 } 154 }
155 } 155 }
156 } 156 }
157 157
158 - (void)setFadeOutValue:(CGFloat)value { 158 - (void)setFadeOutValue:(CGFloat)value {
159 [self setNeedsDisplay]; 159 [self setNeedsDisplay];
160 } 160 }
161 161
162 - (NSImage*)imageForHoverState:(HoverState)hoverState { 162 - (NSImage*)imageForHoverState:(HoverState)hoverState {
163 int imageID = IDR_TAB_CLOSE; 163 int imageID = IDR_CLOSE_1;
164 switch (hoverState) { 164 switch (hoverState) {
165 case kHoverStateNone: 165 case kHoverStateNone:
166 imageID = IDR_TAB_CLOSE; 166 imageID = IDR_CLOSE_1;
167 break; 167 break;
168 case kHoverStateMouseOver: 168 case kHoverStateMouseOver:
169 imageID = IDR_TAB_CLOSE_H; 169 imageID = IDR_CLOSE_1_H;
170 break; 170 break;
171 case kHoverStateMouseDown: 171 case kHoverStateMouseDown:
172 imageID = IDR_TAB_CLOSE_P; 172 imageID = IDR_CLOSE_1_P;
173 break; 173 break;
174 } 174 }
175 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 175 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
176 return bundle.GetNativeImageNamed(imageID).ToNSImage(); 176 return bundle.GetNativeImageNamed(imageID).ToNSImage();
177 } 177 }
178 178
179 - (void)setHoverState:(HoverState)state { 179 - (void)setHoverState:(HoverState)state {
180 if (state != self.hoverState) { 180 if (state != self.hoverState) {
181 previousState_ = self.hoverState; 181 previousState_ = self.hoverState;
182 [super setHoverState:state]; 182 [super setHoverState:state];
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 break; 246 break;
247 case kHoverStateMouseDown: 247 case kHoverStateMouseDown:
248 imageID = IDR_CLOSE_DIALOG_P; 248 imageID = IDR_CLOSE_DIALOG_P;
249 break; 249 break;
250 } 250 }
251 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 251 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
252 return bundle.GetNativeImageNamed(imageID).ToNSImage(); 252 return bundle.GetNativeImageNamed(imageID).ToNSImage();
253 } 253 }
254 254
255 @end 255 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm ('k') | chrome/browser/ui/cocoa/infobars/infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698