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: views/controls/combobox/combobox.cc

Issue 7982009: views: Add comment to Combobox's native wrapper about its lifetime. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/combobox/combobox.cc
diff --git a/views/controls/combobox/combobox.cc b/views/controls/combobox/combobox.cc
index 0f8ee2bdee16e2e35578500faaaaa54071d3b460..794301aa32cf5dfbccfbdd5388f3c91652c2a192 100644
--- a/views/controls/combobox/combobox.cc
+++ b/views/controls/combobox/combobox.cc
@@ -129,6 +129,8 @@ void Combobox::GetAccessibleState(ui::AccessibleViewState* state) {
void Combobox::ViewHierarchyChanged(bool is_add, View* parent,
View* child) {
if (is_add && !native_wrapper_ && GetWidget()) {
+ // The native wrapper's lifetime will be managed by the view hierarchy after
+ // we call AddChildView.
native_wrapper_ = NativeComboboxWrapper::CreateWrapper(this);
tfarina 2011/09/20 18:10:50 Same as in views/controls/textfield/textfield.cc:4
AddChildView(native_wrapper_->GetView());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698