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

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

Issue 2046653002: [UI Views] Unset the extension keybinding registry on frame destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 a5af146ca27c3eff3a6dffdb4316343c19cc3ed3..8291251d20d8e8c3feacdacd422ba266d15eaacb 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -479,6 +479,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