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

Unified Diff: ui/file_manager/file_manager/foreground/js/webui_command_extender.js

Issue 2830223003: Compile file_transfer_controller in gyp v2 (Closed)
Patch Set: Fix typo. Created 3 years, 8 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 | « ui/file_manager/file_manager/foreground/js/main_scripts.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/webui_command_extender.js
diff --git a/ui/file_manager/file_manager/foreground/js/webui_command_extender.js b/ui/file_manager/file_manager/foreground/js/webui_command_extender.js
new file mode 100644
index 0000000000000000000000000000000000000000..5a9069a43183574288f57cceca93b30ab77f44fb
--- /dev/null
+++ b/ui/file_manager/file_manager/foreground/js/webui_command_extender.js
@@ -0,0 +1,20 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * Sets 'hidden' property of a cr.ui.Command instance and dispatches
+ * 'hiddenChange' event manually so that associated cr.ui.MenuItem can handle
+ * the event.
+ * TODO(fukino): Remove this workaround when crbug.com/481941 is fixed.
+ *
+ * @param {boolean} value New value of hidden property.
+ */
+cr.ui.Command.prototype.setHidden = function(value) {
+ if (value === this.hidden)
+ return;
+
+ var oldValue = this.hidden;
+ this.hidden = value;
+ cr.dispatchPropertyChange(this, 'hidden', value, oldValue);
+};
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/main_scripts.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698