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

Unified Diff: chrome/browser/cocoa/constrained_window_mac.h

Issue 164391: Implement http auth login dialog for OS X. (Closed)
Patch Set: re-disable nonfuntional test Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/cocoa/constrained_window_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/constrained_window_mac.h
diff --git a/chrome/browser/cocoa/constrained_window_mac.h b/chrome/browser/cocoa/constrained_window_mac.h
index 48e0a9f5efe37e5819c06cb9a1012d51e8d84c15..519a42ad01db4f77110ed2977537b2ce7b8d957f 100644
--- a/chrome/browser/cocoa/constrained_window_mac.h
+++ b/chrome/browser/cocoa/constrained_window_mac.h
@@ -71,13 +71,27 @@ class ConstrainedWindowMacDelegateSystemSheet
class ConstrainedWindowMacDelegateCustomSheet
: public ConstrainedWindowMacDelegate {
public:
- ConstrainedWindowMacDelegateCustomSheet(
- NSWindow* customSheet, id delegate, SEL didEndSelector)
+ ConstrainedWindowMacDelegateCustomSheet()
+ : customSheet_(nil),
+ delegate_(nil),
+ didEndSelector_(NULL) { }
+
+ ConstrainedWindowMacDelegateCustomSheet(id delegate, SEL didEndSelector)
: customSheet_(nil),
delegate_([delegate retain]),
didEndSelector_(didEndSelector) { }
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]); }
NSWindow* sheet() { return customSheet_; }
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/cocoa/constrained_window_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698