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

Unified Diff: chrome/browser/resources/options2/media_galleries_manager_overlay.js

Issue 10809005: Options: Rename chrome/browser/resources/options2 -> chrome/browser/resources/options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 8 years, 4 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: chrome/browser/resources/options2/media_galleries_manager_overlay.js
diff --git a/chrome/browser/resources/options2/media_galleries_manager_overlay.js b/chrome/browser/resources/options2/media_galleries_manager_overlay.js
deleted file mode 100644
index e1a24ff231744de85f031d64961125f2ef0785f9..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/options2/media_galleries_manager_overlay.js
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2012 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.
-
-cr.define('options', function() {
- /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
- /** @const */ var OptionsPage = options.OptionsPage;
-
- /**
- * This class is an overlay which allows the user to add or remove media
- * galleries, and displays known media galleries.
- * @constructor
- * @extends {OptionsPage}
- */
- function MediaGalleriesManager() {
- OptionsPage.call(this, 'manageGalleries',
- loadTimeData.getString('manageMediaGalleriesTabTitle'),
- 'manage-media-galleries-overlay');
- }
-
- cr.addSingletonGetter(MediaGalleriesManager);
-
- MediaGalleriesManager.prototype = {
- __proto__: OptionsPage.prototype,
-
- /**
- * Decorate the overlay and set up event handlers.
- */
- initializePage: function() {
- OptionsPage.prototype.initializePage.call(this);
-
- this.availableGalleriesList_ = $('available-galleries-list');
- options.MediaGalleriesList.decorate(this.availableGalleriesList_);
-
- $('new-media-gallery').addEventListener('click', function() {
- chrome.send('addNewGallery');
- });
-
- $('manage-media-confirm').addEventListener(
- 'click', OptionsPage.closeOverlay.bind(OptionsPage));
-
- this.addEventListener('visibleChange', this.handleVisibleChange_);
- },
-
- /**
- * @inheritDoc
- * @private
- */
- handleVisibleChange_: function() {
- if (!this.visible)
- return;
-
- if (this.availableGalleriesList_)
- this.availableGalleriesList_.redraw();
- },
-
- /**
- * @param {Array} galleries List of structs describibing galleries.
- * @private
- */
- setAvailableMediaGalleries_: function(galleries) {
- $('available-galleries-list').dataModel = new ArrayDataModel(galleries);
- // TODO(estade): show this section by default.
- $('media-galleries-section').hidden = false;
- },
- },
-
- // Forward public APIs to private implementations.
- [
- 'setAvailableMediaGalleries',
- ].forEach(function(name) {
- MediaGalleriesManager[name] = function() {
- var instance = MediaGalleriesManager.getInstance();
- return instance[name + '_'].apply(instance, arguments);
- };
- });
-
- // Export
- return {
- MediaGalleriesManager: MediaGalleriesManager
- };
-});
« no previous file with comments | « chrome/browser/resources/options2/media_galleries_manager_overlay.html ('k') | chrome/browser/resources/options2/options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698