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

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: Added unit tests Created 8 years, 11 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 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) {

Powered by Google App Engine
This is Rietveld 408576698