summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_shelf.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_shelf.cc')
-rw-r--r--chrome/browser/extensions/extension_shelf.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_shelf.cc b/chrome/browser/extensions/extension_shelf.cc
index 2c1924b..1d4eac3 100644
--- a/chrome/browser/extensions/extension_shelf.cc
+++ b/chrome/browser/extensions/extension_shelf.cc
@@ -365,6 +365,12 @@ void ExtensionShelf::ExtensionShelfEmpty() {
PreferredSizeChanged();
}
+void ExtensionShelf::ShelfModelReloaded() {
+ // None of the child views are parent owned, so nothing is being leaked here.
+ RemoveAllChildViews(false);
+ LoadFromModel();
+}
+
void ExtensionShelf::OnExtensionMouseEvent(ExtensionView* view) {
// Ignore these events when dragging.
if (drag_placeholder_view_)
@@ -578,7 +584,6 @@ void ExtensionShelf::LayoutShelfHandle() {
void ExtensionShelf::LoadFromModel() {
int count = model_->count();
- for (int i = 0; i < count; ++i) {
+ for (int i = 0; i < count; ++i)
ToolstripInsertedAt(model_->ToolstripAt(i), i);
- }
}