Index: chrome/browser/ui/cocoa/constrained_window_mac.h |
diff --git a/chrome/browser/ui/cocoa/constrained_window_mac.h b/chrome/browser/ui/cocoa/constrained_window_mac.h |
index 7c056ed43f80a30ea561e5315a3f690b82394699..31003ada2fb20a09e27bad54528dd3992dffd9c3 100644 |
--- a/chrome/browser/ui/cocoa/constrained_window_mac.h |
+++ b/chrome/browser/ui/cocoa/constrained_window_mac.h |
@@ -25,7 +25,7 @@ class TabContents; |
class ConstrainedWindowMacDelegate { |
public: |
ConstrainedWindowMacDelegate() : is_sheet_open_(false) { } |
- virtual ~ConstrainedWindowMacDelegate(); |
+ virtual ~ConstrainedWindowMacDelegate() {} |
Nico
2011/02/18 23:35:11
:-P
Remove the space between {} in the line above
|
// Tells the delegate to either delete itself or set up a task to delete |
// itself later. Note that you MUST close the sheet belonging to your delegate |
@@ -51,13 +51,11 @@ class ConstrainedWindowMacDelegate { |
class ConstrainedWindowMacDelegateSystemSheet |
: public ConstrainedWindowMacDelegate { |
public: |
- ConstrainedWindowMacDelegateSystemSheet(id delegate, SEL didEndSelector) |
- : systemSheet_(nil), |
- delegate_([delegate retain]), |
- didEndSelector_(didEndSelector) { } |
+ ConstrainedWindowMacDelegateSystemSheet(id delegate, SEL didEndSelector); |
+ virtual ~ConstrainedWindowMacDelegateSystemSheet(); |
protected: |
- void set_sheet(id sheet) { systemSheet_.reset([sheet retain]); } |
+ void set_sheet(id sheet); |
id sheet() { return systemSheet_; } |
// Returns an NSArray to be passed as parameters to GTMWindowSheetController. |
@@ -83,28 +81,14 @@ class ConstrainedWindowMacDelegateSystemSheet |
class ConstrainedWindowMacDelegateCustomSheet |
: public ConstrainedWindowMacDelegate { |
public: |
- ConstrainedWindowMacDelegateCustomSheet() |
- : customSheet_(nil), |
- delegate_(nil), |
- didEndSelector_(NULL) { } |
- |
- ConstrainedWindowMacDelegateCustomSheet(id delegate, SEL didEndSelector) |
- : customSheet_(nil), |
- delegate_([delegate retain]), |
- didEndSelector_(didEndSelector) { } |
+ ConstrainedWindowMacDelegateCustomSheet(); |
+ ConstrainedWindowMacDelegateCustomSheet(id delegate, SEL didEndSelector); |
+ ~ConstrainedWindowMacDelegateCustomSheet(); |
protected: |
// For when you need to delay initalization after the constructor call. |
- void init(NSWindow* sheet, id delegate, SEL didEndSelector) { |
- DCHECK(!delegate_.get()); |
- DCHECK(!didEndSelector_); |
- customSheet_.reset([sheet retain]); |
- delegate_.reset([delegate retain]); |
- didEndSelector_ = didEndSelector; |
- DCHECK(delegate_.get()); |
- DCHECK(didEndSelector_); |
- } |
- void set_sheet(NSWindow* sheet) { customSheet_.reset([sheet retain]); } |
+ void init(NSWindow* sheet, id delegate, SEL didEndSelector); |
+ void set_sheet(NSWindow* sheet); |
NSWindow* sheet() { return customSheet_; } |
private: |