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

Unified Diff: chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm

Issue 9307086: [Web Intents, Mac] Allow re-open after cancellation/close of picker bubble (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review issue Created 8 years, 10 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
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) {

Powered by Google App Engine
This is Rietveld 408576698