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

Unified Diff: ui/file_manager/gallery/js/gallery.js

Issue 291483006: Gallery: Remove the back button that is used to let users go back to Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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: ui/file_manager/gallery/js/gallery.js
diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js
index 2a65793c27becdbcfbd25a82a535bdf790700bd9..6e210f734d41f89b9f857ad7ee9e5ba3d9fc4b97 100644
--- a/ui/file_manager/gallery/js/gallery.js
+++ b/ui/file_manager/gallery/js/gallery.js
@@ -28,7 +28,6 @@ ContentProvider.WORKER_SCRIPT = '/js/metadata_worker.js';
function Gallery(volumeManager) {
this.context_ = {
appWindow: chrome.app.window.current(),
- onBack: function() {},
onClose: function() { close(); },
onMaximize: function() {
var appWindow = chrome.app.window.current();
@@ -130,7 +129,7 @@ Gallery.prototype.onExternallyUnmounted_ = function(event) {
if (this.volumeManager_.getVolumeInfo(this.selectedEntry_) ===
event.volumeInfo) {
- this.onBack_();
+ close();
}
};
@@ -161,11 +160,6 @@ Gallery.prototype.initDom_ = function() {
this.header_ = util.createChild(this.container_, 'header tool dimmable');
this.toolbar_ = util.createChild(this.container_, 'toolbar tool dimmable');
- var backButton = util.createChild(this.container_,
- 'back-button tool dimmable');
- util.createChild(backButton);
- backButton.addEventListener('click', this.onBack_.bind(this));
-
var preventDefault = function(event) { event.preventDefault(); };
var minimizeButton = util.createChild(this.header_,
@@ -336,26 +330,6 @@ Gallery.prototype.load = function(entries, selectedEntries) {
};
/**
- * Closes the Gallery and go to Files.app.
- * @private
- */
-Gallery.prototype.back_ = function() {
- if (util.isFullScreen(this.context_.appWindow)) {
- util.toggleFullScreen(this.context_.appWindow,
- false); // Leave the full screen mode.
- }
- this.context_.onBack(this.getSelectedEntries());
-};
-
-/**
- * Handles user's 'Back' action (Escape or a click on the X icon).
- * @private
- */
-Gallery.prototype.onBack_ = function() {
- this.executeWhenReady(this.back_.bind(this));
-};
-
-/**
* Handles user's 'Close' action.
* @private
*/
@@ -612,12 +586,6 @@ Gallery.prototype.onKeyDown_ = function(event) {
event.preventDefault();
break;
- case 'U+001B': // Escape
- // Swallow Esc if it closed the Share menu, otherwise close the Gallery.
- if (!wasSharing)
- this.onBack_();
- break;
-
case 'U+004D': // 'm' switches between Slide and Mosaic mode.
this.toggleMode_(null, event);
break;
« 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