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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2061383002: [UI Views] Unset the extension keybinding registry on frame destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: 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
« 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: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 7b5ad82e11fb76fda31001810fb7bab2bcf75fe0..5fe85c77654408533be1258072bda31c2f9e58fb 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -483,6 +483,12 @@ BrowserView::~BrowserView() {
}
#endif
+ extensions::ExtensionCommandsGlobalRegistry* global_registry =
+ extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile());
+ if (global_registry->registry_for_active_window() ==
+ extension_keybinding_registry_.get())
+ global_registry->set_registry_for_active_window(nullptr);
+
// We destroy the download shelf before |browser_| to remove its child
// download views from the set of download observers (since the observed
// downloads can be destroyed along with |browser_| and the observer
« 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