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

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

Issue 2628833002: Quick View UMA: export how quick view was opened. (Closed)
Patch Set: Fix closure compilation error. Created 3 years, 11 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_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/quick_view_controller.js b/ui/file_manager/file_manager/foreground/js/quick_view_controller.js
index c651a9e0dc9b05b1db065f9eddc97682245bae93..d5c312f8ef77ad8243ddf49e898ea3ba76f49d04 100644
--- a/ui/file_manager/file_manager/foreground/js/quick_view_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/quick_view_controller.js
@@ -76,7 +76,7 @@ function QuickViewController(
'keydown', this.onKeyDownToOpen_.bind(this));
listContainer.element.addEventListener('command', function(event) {
if(event.command.id === 'get-info')
- this.display_();
+ this.display_(QuickViewUma.WayToOpen.CONTEXT_MENU);
}.bind(this));
quickView.addEventListener('keydown', this.onQuickViewKeyDown_.bind(this));
quickView.addEventListener('iron-overlay-closed', function() {
@@ -111,7 +111,7 @@ QuickViewController.prototype.onKeyDownToOpen_ = function(event) {
return;
if (event.key === ' ') {
event.preventDefault();
- this.display_();
+ this.display_(QuickViewUma.WayToOpen.SPACE_KEY);
}
};
@@ -147,14 +147,16 @@ QuickViewController.prototype.onQuickViewKeyDown_ = function(event) {
/**
* Display quick view.
+ * @param {QuickViewUma.WayToOpen=} wayToOpen in which way opening of
fukino 2017/01/12 03:46:01 If this is an optional parameter, it should be opt
oka 2017/01/12 04:14:02 This is actually optional. It doesn't have to be p
+ * quick view was triggered. Can be omitted if quick view is already open.
*
* @private
*/
-QuickViewController.prototype.display_ = function() {
+QuickViewController.prototype.display_ = function(wayToOpen) {
this.updateQuickView_().then(function() {
if (!this.quickView_.isOpened()) {
this.quickView_.open();
- this.quickViewUma_.onOpened(this.entries_[0]);
+ this.quickViewUma_.onOpened(this.entries_[0], assert(wayToOpen));
}
}.bind(this));
};

Powered by Google App Engine
This is Rietveld 408576698