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

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

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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.h
diff --git a/chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.h b/chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.h
index 1bcc969d377fcaacd01c0e6a0b3d33abf512e77d..ea25978f0c1bc9310239326890ecaca769dbb9fd 100644
--- a/chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.h
+++ b/chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.h
@@ -26,7 +26,11 @@ class WebIntentPickerCocoa2 : public WebIntentPicker,
WebIntentPickerModel* model);
virtual ~WebIntentPickerCocoa2();
- WebIntentPickerDelegate* delegate() const { return delegate_; }
+ WebIntentPickerDelegate* delegate() const {
+ DCHECK(delegate_);
+ return delegate_;
+ }
+
WebIntentPickerModel* model() const { return model_; }
content::WebContents* web_contents() const { return web_contents_; }
ConstrainedWindowMac2* constrained_window() const {
@@ -50,6 +54,7 @@ class WebIntentPickerCocoa2 : public WebIntentPicker,
virtual void OnInlineDispositionHandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) OVERRIDE;
virtual void OnPendingAsyncCompleted() OVERRIDE;
+ virtual void InvalidateDelegate() OVERRIDE;
virtual void OnInlineDispositionWebContentsLoaded(
content::WebContents* web_contents) OVERRIDE;
virtual gfx::Size GetMinInlineDispositionSize() OVERRIDE;
@@ -69,7 +74,7 @@ class WebIntentPickerCocoa2 : public WebIntentPicker,
private:
content::WebContents* const web_contents_;
- WebIntentPickerDelegate* const delegate_;
+ WebIntentPickerDelegate* delegate_;
WebIntentPickerModel* model_;
scoped_nsobject<WebIntentPickerViewController> view_controller_;
scoped_ptr<ConstrainedWindowMac2> constrained_window_;
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/intents/web_intent_picker_cocoa2.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698