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

Unified Diff: third_party/WebKit/Source/devtools/front_end/quick_open/CommandMenu.js

Issue 2793873002: DevTools: Update CommandMenuProvider on attach instead of construction (Closed)
Patch Set: Created 3 years, 9 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: third_party/WebKit/Source/devtools/front_end/quick_open/CommandMenu.js
diff --git a/third_party/WebKit/Source/devtools/front_end/quick_open/CommandMenu.js b/third_party/WebKit/Source/devtools/front_end/quick_open/CommandMenu.js
index 6be020be4c1fe25ddd673f7ce12e8ba16c1376f7..0ca09d36ba28d2e5971804e267708461ab3caed3 100644
--- a/third_party/WebKit/Source/devtools/front_end/quick_open/CommandMenu.js
+++ b/third_party/WebKit/Source/devtools/front_end/quick_open/CommandMenu.js
@@ -113,10 +113,12 @@ QuickOpen.CommandMenuProvider = class extends QuickOpen.FilteredListWidget.Provi
constructor() {
super();
this._commands = [];
- this._appendAvailableCommands();
}
- _appendAvailableCommands() {
+ /**
+ * @override
+ */
+ attach() {
var allCommands = QuickOpen.commandMenu.commands();
// Populate whitelisted actions.
@@ -146,6 +148,13 @@ QuickOpen.CommandMenuProvider = class extends QuickOpen.FilteredListWidget.Provi
/**
* @override
+ */
+ detach() {
+ this._commands = [];
+ }
+
+ /**
+ * @override
* @return {number}
*/
itemCount() {
« 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