Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / resources / options / language_add_language_overlay.js
index f91d170..a9484c4 100644 (file)
@@ -6,35 +6,32 @@
 // AddLanguageOverlay class:
 
 cr.define('options', function() {
-  /** @const */ var OptionsPage = options.OptionsPage;
+  /** @const */ var Page = cr.ui.pageManager.Page;
+  /** @const */ var PageManager = cr.ui.pageManager.PageManager;
 
   /**
    * Encapsulated handling of ChromeOS add language overlay page.
    * @constructor
    */
   function AddLanguageOverlay() {
-    OptionsPage.call(this, 'addLanguage',
-                     loadTimeData.getString('addButton'),
-                     'add-language-overlay-page');
+    Page.call(this, 'addLanguage',
+              loadTimeData.getString('addButton'),
+              'add-language-overlay-page');
   }
 
   cr.addSingletonGetter(AddLanguageOverlay);
 
   AddLanguageOverlay.prototype = {
-    // Inherit AddLanguageOverlay from OptionsPage.
-    __proto__: OptionsPage.prototype,
+    // Inherit AddLanguageOverlay from Page.
+    __proto__: Page.prototype,
 
-    /**
-     * Initializes AddLanguageOverlay page.
-     * Calls base class implementation to starts preference initialization.
-     */
+    /** @override */
     initializePage: function() {
-      // Call base class implementation to starts preference initialization.
-      OptionsPage.prototype.initializePage.call(this);
+      Page.prototype.initializePage.call(this);
 
       // Set up the cancel button.
       $('add-language-overlay-cancel-button').onclick = function(e) {
-        OptionsPage.closeOverlay();
+        PageManager.closeOverlay();
       };
 
       // Create the language list with which users can add a language.