summaryrefslogtreecommitdiffstats
path: root/ui/file_manager
diff options
context:
space:
mode:
authorhirono@chromium.org <hirono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-16 10:21:08 +0000
committerhirono@chromium.org <hirono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-16 10:21:08 +0000
commite45bfaad00bbad0e643409883b78003eb870d916 (patch)
tree445bf02615014f0e8ec1b4fc1acf128fda325031 /ui/file_manager
parent0107d8a5c38e1d5c7f8dce4e0454b20d996c6e48 (diff)
downloadchromium_src-e45bfaad00bbad0e643409883b78003eb870d916.zip
chromium_src-e45bfaad00bbad0e643409883b78003eb870d916.tar.gz
chromium_src-e45bfaad00bbad0e643409883b78003eb870d916.tar.bz2
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
Diffstat (limited to 'ui/file_manager')
-rw-r--r--ui/file_manager/gallery/js/gallery.js34
1 files changed, 1 insertions, 33 deletions
diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js
index 2a65793..6e210f7 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;