Commit e45bfaad authored by hirono@chromium.org's avatar hirono@chromium.org

Gallery: Remove the back button that is used to let users go back to Files.app.

The separated version of Gallery does not need the button.

BUG=358698
TEST=manually

Review URL: https://codereview.chromium.org/291483006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270978 0039d316-1c4b-4281-b951-d872f2087c98
parent 0107d8a5
......@@ -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_,
......@@ -335,26 +329,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment