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

Unified Diff: chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.mm

Issue 11141037: Disable delegation to picker controller once it is deleted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix tests. Created 8 years, 2 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/intents/web_intent_picker_cocoa2.mm
diff --git a/chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.mm b/chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.mm
index 72edc4db91690e077103c01bcec06ced60aa77d5..63182990c35cbd80c9d572e368ef05287317e79c 100644
--- a/chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.mm
+++ b/chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.mm
@@ -44,7 +44,7 @@ void WebIntentPickerCocoa2::Close() {
}
void WebIntentPickerCocoa2::SetActionString(const string16& action) {
- // Ignored. Action string it retrieved from the model.
+ // Ignored. Action string is retrieved from the model.
}
void WebIntentPickerCocoa2::OnExtensionInstallSuccess(const std::string& id) {
@@ -84,6 +84,10 @@ void WebIntentPickerCocoa2::OnPendingAsyncCompleted() {
[view_controller_ update];
}
+void WebIntentPickerCocoa2::InvalidateDelegate() {
+ delegate_ = NULL;
+}
+
void WebIntentPickerCocoa2::OnInlineDispositionWebContentsLoaded(
content::WebContents* web_contents) {
[view_controller_ update];
@@ -119,6 +123,7 @@ void WebIntentPickerCocoa2::OnConstrainedWindowClosed(
model_->set_observer(NULL);
model_ = NULL;
- delegate_->OnClosing();
+ if (delegate_)
+ delegate_->OnClosing();
MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
« no previous file with comments | « chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.h ('k') | chrome/browser/ui/cocoa/web_intent_picker_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698