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

Side by Side 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: OSX delegate invalidation. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_
6 #define CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_ 6 #define CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/memory/scoped_nsobject.h" 10 #include "base/memory/scoped_nsobject.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual void OnExtensionInstallFailure(const std::string& id) OVERRIDE; 43 virtual void OnExtensionInstallFailure(const std::string& id) OVERRIDE;
44 virtual void OnShowExtensionInstallDialog( 44 virtual void OnShowExtensionInstallDialog(
45 gfx::NativeWindow parent, 45 gfx::NativeWindow parent,
46 content::PageNavigator* navigator, 46 content::PageNavigator* navigator,
47 ExtensionInstallPrompt::Delegate* delegate, 47 ExtensionInstallPrompt::Delegate* delegate,
48 const ExtensionInstallPrompt::Prompt& prompt) OVERRIDE; 48 const ExtensionInstallPrompt::Prompt& prompt) OVERRIDE;
49 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) OVERRIDE; 49 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) OVERRIDE;
50 virtual void OnInlineDispositionHandleKeyboardEvent( 50 virtual void OnInlineDispositionHandleKeyboardEvent(
51 const content::NativeWebKeyboardEvent& event) OVERRIDE; 51 const content::NativeWebKeyboardEvent& event) OVERRIDE;
52 virtual void OnPendingAsyncCompleted() OVERRIDE; 52 virtual void OnPendingAsyncCompleted() OVERRIDE;
53 virtual void InvalidateDelegate() OVERRIDE;
53 virtual void OnInlineDispositionWebContentsLoaded( 54 virtual void OnInlineDispositionWebContentsLoaded(
54 content::WebContents* web_contents) OVERRIDE; 55 content::WebContents* web_contents) OVERRIDE;
55 virtual gfx::Size GetMinInlineDispositionSize() OVERRIDE; 56 virtual gfx::Size GetMinInlineDispositionSize() OVERRIDE;
56 57
57 // WebIntentPickerModelObserver implementation. 58 // WebIntentPickerModelObserver implementation.
58 virtual void OnModelChanged(WebIntentPickerModel* model) OVERRIDE; 59 virtual void OnModelChanged(WebIntentPickerModel* model) OVERRIDE;
59 virtual void OnFaviconChanged(WebIntentPickerModel* model, 60 virtual void OnFaviconChanged(WebIntentPickerModel* model,
60 size_t index) OVERRIDE; 61 size_t index) OVERRIDE;
61 virtual void OnExtensionIconChanged(WebIntentPickerModel* model, 62 virtual void OnExtensionIconChanged(WebIntentPickerModel* model,
62 const std::string& extension_id) OVERRIDE; 63 const std::string& extension_id) OVERRIDE;
63 virtual void OnInlineDisposition(const string16& title, 64 virtual void OnInlineDisposition(const string16& title,
64 const GURL& url) OVERRIDE; 65 const GURL& url) OVERRIDE;
65 66
66 // ConstrainedWindowMacDelegate2 implementation. 67 // ConstrainedWindowMacDelegate2 implementation.
67 virtual void OnConstrainedWindowClosed( 68 virtual void OnConstrainedWindowClosed(
68 ConstrainedWindowMac2* window) OVERRIDE; 69 ConstrainedWindowMac2* window) OVERRIDE;
69 70
70 private: 71 private:
71 content::WebContents* const web_contents_; 72 content::WebContents* const web_contents_;
72 WebIntentPickerDelegate* const delegate_; 73 WebIntentPickerDelegate* delegate_;
73 WebIntentPickerModel* model_; 74 WebIntentPickerModel* model_;
74 scoped_nsobject<WebIntentPickerViewController> view_controller_; 75 scoped_nsobject<WebIntentPickerViewController> view_controller_;
75 scoped_ptr<ConstrainedWindowMac2> constrained_window_; 76 scoped_ptr<ConstrainedWindowMac2> constrained_window_;
76 }; 77 };
77 78
78 #endif // CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_ 79 #endif // CHROME_BROWSER_UI_COCOA_INTENTS_WEB_INTENT_PICKER_COCOA2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698