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

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

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 #import "chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.h" 5 #import "chrome/browser/ui/cocoa/profile_signin_confirmation_dialog_cocoa.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_dialogs.h" 9 #include "chrome/browser/ui/browser_dialogs.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 base::Unretained(this)); 65 base::Unretained(this));
66 controller_.reset( 66 controller_.reset(
67 [[ProfileSigninConfirmationViewController alloc] 67 [[ProfileSigninConfirmationViewController alloc]
68 initWithBrowser:browser 68 initWithBrowser:browser
69 username:username 69 username:username
70 delegate:delegate 70 delegate:delegate
71 closeDialogCallback:closeDialogCallback 71 closeDialogCallback:closeDialogCallback
72 offerProfileCreation:offer_profile_creation]); 72 offerProfileCreation:offer_profile_creation]);
73 73
74 // Setup the constrained window that will show the view. 74 // Setup the constrained window that will show the view.
75 scoped_nsobject<NSWindow> window( 75 base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc]
76 [[ConstrainedWindowCustomWindow alloc] 76 initWithContentRect:[[controller_ view] bounds]]);
77 initWithContentRect:[[controller_ view] bounds]]);
78 [[window contentView] addSubview:[controller_ view]]; 77 [[window contentView] addSubview:[controller_ view]];
79 scoped_nsobject<CustomConstrainedWindowSheet> sheet( 78 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
80 [[CustomConstrainedWindowSheet alloc] 79 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]);
81 initWithCustomWindow:window]);
82 window_.reset(new ConstrainedWindowMac(this, web_contents, sheet)); 80 window_.reset(new ConstrainedWindowMac(this, web_contents, sheet));
83 } 81 }
84 82
85 ProfileSigninConfirmationDialogCocoa::~ProfileSigninConfirmationDialogCocoa() { 83 ProfileSigninConfirmationDialogCocoa::~ProfileSigninConfirmationDialogCocoa() {
86 } 84 }
87 85
88 void ProfileSigninConfirmationDialogCocoa::Close() { 86 void ProfileSigninConfirmationDialogCocoa::Close() {
89 window_->CloseWebContentsModalDialog(); 87 window_->CloseWebContentsModalDialog();
90 } 88 }
91 89
92 void ProfileSigninConfirmationDialogCocoa::OnConstrainedWindowClosed( 90 void ProfileSigninConfirmationDialogCocoa::OnConstrainedWindowClosed(
93 ConstrainedWindowMac* window) { 91 ConstrainedWindowMac* window) {
94 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 92 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
95 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698