diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-10 16:51:12 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-10 16:51:12 +0000 |
commit | 3a33198fb7ef66d933cc6475329333ac735a0d5e (patch) | |
tree | 4b329d5c8cbbfcfcc5d865951c66705c5334f345 /chrome/browser | |
parent | a82325a46a377f0fa27268066685e4ad393607e1 (diff) | |
download | chromium_src-3a33198fb7ef66d933cc6475329333ac735a0d5e.zip chromium_src-3a33198fb7ef66d933cc6475329333ac735a0d5e.tar.gz chromium_src-3a33198fb7ef66d933cc6475329333ac735a0d5e.tar.bz2 |
Converts a private variable to use scoped_nsobject.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/118506
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18066 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/cocoa/grow_box_view.h | 4 | ||||
-rw-r--r-- | chrome/browser/cocoa/grow_box_view.mm | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/grow_box_view.h b/chrome/browser/cocoa/grow_box_view.h index 04b6fd2..de44366 100644 --- a/chrome/browser/cocoa/grow_box_view.h +++ b/chrome/browser/cocoa/grow_box_view.h @@ -7,6 +7,8 @@ #import <Cocoa/Cocoa.h> +#include "base/scoped_nsobject.h" + // A class that handles drawing and mouse tracking to replace the standard // window "grow box" grippy in cases where the OS one won't do. Relies on // an image named "grow_box" be included in the application's resources. The @@ -14,7 +16,7 @@ @interface GrowBoxView : NSView { @private - NSImage* image_; // grow box image + scoped_nsobject<NSImage> image_; // grow box image NSPoint startPoint_; // location of the mouseDown event. NSRect startFrame_; // original window frame. NSRect clipRect_; // constrain the resized window to this frame. diff --git a/chrome/browser/cocoa/grow_box_view.mm b/chrome/browser/cocoa/grow_box_view.mm index 5f74b08..cce8bb3 100644 --- a/chrome/browser/cocoa/grow_box_view.mm +++ b/chrome/browser/cocoa/grow_box_view.mm @@ -21,11 +21,10 @@ @implementation GrowBoxView - (void)awakeFromNib { - image_ = [[NSImage imageNamed:@"grow_box"] retain]; + image_.reset([[NSImage imageNamed:@"grow_box"] retain]); } - (void)dealloc { - [image_ release]; [super dealloc]; } |