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

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

Issue 2060983003: Quick View: Add functinoality to show generic metadata (size and modificationTime). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit 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
Index: ui/file_manager/file_manager/foreground/js/quick_view_model.js
diff --git a/ui/file_manager/file_manager/foreground/js/quick_view_model.js b/ui/file_manager/file_manager/foreground/js/quick_view_model.js
new file mode 100644
index 0000000000000000000000000000000000000000..d3c9309b4e43812e9af1a1469f9a74207c957a2c
--- /dev/null
+++ b/ui/file_manager/file_manager/foreground/js/quick_view_model.js
@@ -0,0 +1,40 @@
+// Copyright 2016 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.
+
+/**
+ * Quick view model that doesn't fit into properties of quick view element.
+ *
+ * @constructor
+ * @struct
+ * @extends {cr.EventTarget}
+ */
+function QuickViewModel() {
+ /**
+ * Current selected file entry.
+ * @type {FileEntry}
+ * @private
+ */
+ this.selectedEntry_ = null;
+}
+
+/**
+ * QuickViewModel extends cr.EventTarget.
+ */
+QuickViewModel.prototype.__proto__ = cr.EventTarget.prototype;
+
+/**
+ * @return {FileEntry}
+ * @nosideeffects
+ */
+QuickViewModel.prototype.getSelectedEntry = function() {
+ return this.selectedEntry_;
+};
+
+/**
+ * @param {!FileEntry} entry
+ */
+QuickViewModel.prototype.setSelectedEntry = function(entry) {
+ this.selectedEntry_ = entry;
+ cr.dispatchSimpleEvent(this, 'selected-entry-changed');
+};
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/quick_view_controller.js ('k') | ui/file_manager/file_manager/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698