| Index: chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
|
| diff --git a/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm b/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
|
| index 182e600d2ca1bfd2505ebc2d9289340f44355d98..b025780955bedbdbd574c14a4e9f34bb11a1ee28 100644
|
| --- a/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
|
| +++ b/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
|
| @@ -75,6 +75,10 @@ WebIntentPickerCocoa::~WebIntentPickerCocoa() {
|
| }
|
|
|
| void WebIntentPickerCocoa::Close() {
|
| + DCHECK(controller_);
|
| + [controller_ close];
|
| + if (inline_disposition_tab_contents_.get())
|
| + inline_disposition_tab_contents_->web_contents()->OnCloseStarted();
|
| }
|
|
|
| void WebIntentPickerCocoa::PerformDelayedLayout() {
|
| @@ -142,7 +146,8 @@ void WebIntentPickerCocoa::OnInlineDisposition(WebIntentPickerModel* model) {
|
| void WebIntentPickerCocoa::OnCancelled() {
|
| DCHECK(delegate_);
|
| delegate_->OnCancelled();
|
| - controller_ = NULL; // Controller will be unusable soon, abandon.
|
| + delegate_->OnClosing();
|
| + MessageLoop::current()->DeleteSoon(FROM_HERE, this);
|
| }
|
|
|
| void WebIntentPickerCocoa::OnServiceChosen(size_t index) {
|
|
|