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

Unified Diff: chrome/browser/ui/website_settings/chooser_bubble_delegate.h

Issue 2086663003: Change ChooserController ownership model (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address reillyg@'s comments Created 4 years, 6 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/website_settings/chooser_bubble_delegate.h
diff --git a/chrome/browser/ui/website_settings/chooser_bubble_delegate.h b/chrome/browser/ui/website_settings/chooser_bubble_delegate.h
index bafc894c2a86aaf14d253150531a385f1126dde6..7e5353ffba94ff16b91ff138173345234c786100 100644
--- a/chrome/browser/ui/website_settings/chooser_bubble_delegate.h
+++ b/chrome/browser/ui/website_settings/chooser_bubble_delegate.h
@@ -30,13 +30,14 @@ class ChooserBubbleDelegate : public BubbleDelegate {
std::unique_ptr<BubbleUi> BuildBubbleUi() override;
const content::RenderFrameHost* OwningFrame() const override;
- ChooserController* chooser_controller() const {
- return chooser_controller_.get();
- }
-
private:
const content::RenderFrameHost* const owning_frame_;
Browser* browser_;
+ // |chooser_controller_| is not owned by this class, it is owned by
+ // ChooserContentView(non-Mac)/ChooserContentViewCocoa(Mac).
msw 2016/06/22 18:23:17 optional nit: update all the comments to instead s
juncai 2016/06/22 22:41:20 Done.
+ // This field only temporarily owns the ChooserController. It is moved
+ // into the ChooserContentView/ChooserContentViewCocoa when
+ // BuildBubbleUi() is called and the bubble is shown.
msw 2016/06/22 18:23:17 aside: Once again, I really wish the bubble manage
juncai 2016/06/22 22:41:20 Acknowledged.
std::unique_ptr<ChooserController> chooser_controller_;
DISALLOW_COPY_AND_ASSIGN(ChooserBubbleDelegate);

Powered by Google App Engine
This is Rietveld 408576698