| 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 edc64d7dc26c0aea88e60ae322990e953624328c..de5917878b7f9d6aaa596337e0108a309f3d6c1b 100644
|
| --- a/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
|
| +++ b/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
|
| @@ -93,6 +93,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() {
|
| @@ -160,7 +164,8 @@ void WebIntentPickerCocoa::OnInlineDisposition(WebIntentPickerModel* model) {
|
| void WebIntentPickerCocoa::OnCancelled() {
|
| DCHECK(delegate_);
|
| delegate_->OnCancelled();
|
| - controller_ = NULL; // Controller will be unusable soon, abandon.
|
| + delegate_->OnClosing();
|
| + delete this;
|
| }
|
|
|
| void WebIntentPickerCocoa::OnServiceChosen(size_t index) {
|
|
|