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

Side by Side Diff: ui/base/cocoa/controls/hover_image_menu_button_cell.h

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_CELL_H_ 5 #ifndef UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_CELL_H_
6 #define UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_CELL_H_ 6 #define UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_CELL_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/memory/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "ui/base/ui_export.h" 11 #include "ui/base/ui_export.h"
12 12
13 // A custom NSPopUpButtonCell that permits a hover image, and draws only an 13 // A custom NSPopUpButtonCell that permits a hover image, and draws only an
14 // image in its frame; no border, bezel or drop-down arrow. Use setDefaultImage: 14 // image in its frame; no border, bezel or drop-down arrow. Use setDefaultImage:
15 // to set the default image, setAlternateImage: to set the button shown while 15 // to set the default image, setAlternateImage: to set the button shown while
16 // the menu is active, and setHoverImage: for the mouseover hover image. 16 // the menu is active, and setHoverImage: for the mouseover hover image.
17 UI_EXPORT 17 UI_EXPORT
18 @interface HoverImageMenuButtonCell : NSPopUpButtonCell { 18 @interface HoverImageMenuButtonCell : NSPopUpButtonCell {
19 @private 19 @private
20 scoped_nsobject<NSImage> hoverImage_; 20 base::scoped_nsobject<NSImage> hoverImage_;
21 BOOL hovered_; 21 BOOL hovered_;
22 } 22 }
23 23
24 @property(retain, nonatomic) NSImage* hoverImage; 24 @property(retain, nonatomic) NSImage* hoverImage;
25 @property(assign, nonatomic, getter=isHovered) BOOL hovered; 25 @property(assign, nonatomic, getter=isHovered) BOOL hovered;
26 26
27 // Return the image that would be drawn based on the current state flags. 27 // Return the image that would be drawn based on the current state flags.
28 - (NSImage*)imageToDraw; 28 - (NSImage*)imageToDraw;
29 29
30 // Set the default image to show on the menu button. 30 // Set the default image to show on the menu button.
31 - (void)setDefaultImage:(NSImage*)defaultImage; 31 - (void)setDefaultImage:(NSImage*)defaultImage;
32 32
33 @end 33 @end
34 34
35 #endif // UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_CELL_H_ 35 #endif // UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_CELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698