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

Unified Diff: chrome/browser/ui/views/payments/payment_request_dialog_view.cc

Issue 2689363004: [Payments] Add combobox support to editors. (Closed)
Patch Set: Initial Created 3 years, 10 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/views/payments/payment_request_dialog_view.cc
diff --git a/chrome/browser/ui/views/payments/payment_request_dialog_view.cc b/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
index 60b397579f8cd27e5aa089008602534e8992d4bd..a6b28a81d415bdb8e12aa12840c60a7f49c094eb 100644
--- a/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
+++ b/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
@@ -161,6 +161,15 @@ void PaymentRequestDialogView::ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) {
// When a view that is associated with a controller is removed from this
// view's descendants, dispose of the controller.
+
+ // DO NOT SUBMIT Note to reviewer: When we are here, I believe the View is
Mathieu 2017/02/14 21:23:54 See this comment
+ // still valid and not yet destroyed. Line 176 destroys the controller, which
+ // is problematic when the View does get destroyed (see comment in
+ // credit_card_editor_view_controller.h). Can we get notified *after* a View
+ // has been destroyed? Can WidgetObserver observe the view's widget through
+ // OnWidgetDestroyed, so that |details.child->GetWidget()| could become the
+ // key to |controller_map_|? I'm not familiar with GetWidget() enough to know
+ // whether observing the Widget is equivalent to observing the View.
sky 2017/02/14 23:19:24 Is the only way you get here if the ViewStack remo
if (!details.is_add &&
controller_map_.find(details.child) != controller_map_.end()) {
DCHECK(!details.move_view);

Powered by Google App Engine
This is Rietveld 408576698