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

Unified Diff: chrome/browser/resources/ntp_search/nav_dot.js

Issue 12207138: Remove unused ntp_search. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « chrome/browser/resources/ntp_search/nav_dot.css ('k') | chrome/browser/resources/ntp_search/new_tab.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp_search/nav_dot.js
diff --git a/chrome/browser/resources/ntp_search/nav_dot.js b/chrome/browser/resources/ntp_search/nav_dot.js
deleted file mode 100644
index 20af519689334e74433a2d907ae37cf56b29abc7..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/ntp_search/nav_dot.js
+++ /dev/null
@@ -1,88 +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.
-
-/**
- * @fileoverview Nav dot
- * This is the class for the navigation controls that appear along the bottom
- * of the NTP.
- */
-
-cr.define('ntp', function() {
- 'use strict';
-
- /**
- * Creates a new navigation dot.
- * @param {TilePage} page The associated TilePage.
- * @param {string} title The title of the navigation dot.
- * @constructor
- * @extends {HTMLLIElement}
- */
- function NavDot(page, title) {
- var dot = cr.doc.createElement('li');
- dot.__proto__ = NavDot.prototype;
- dot.initialize(page, title);
-
- return dot;
- }
-
- NavDot.prototype = {
- __proto__: HTMLLIElement.prototype,
-
- initialize: function(page, title) {
- this.className = 'dot';
- this.page_ = page;
- this.textContent = title;
-
- this.addEventListener('keydown', this.onKeyDown_);
- this.addEventListener('click', this.onClick_);
- },
-
- /**
- * @return {TilePage} The associated TilePage.
- */
- get page() {
- return this.page_;
- },
-
- /**
- * Removes the dot from the page.
- */
- remove: function() {
- this.parentNode.removeChild(this);
- },
-
- /**
- * Navigates the card slider to the page for this dot.
- */
- switchToPage: function() {
- ntp.getCardSlider().selectCardByValue(this.page_, true);
- },
-
- /**
- * Handler for keydown event on the dot.
- * @param {Event} e The KeyboardEvent.
- */
- onKeyDown_: function(e) {
- if (e.keyIdentifier == 'Enter') {
- this.onClick_(e);
- e.stopPropagation();
- }
- },
-
- /**
- * Clicking causes the associated page to show.
- * @param {Event} e The click event.
- * @private
- */
- onClick_: function(e) {
- this.switchToPage();
- e.stopPropagation();
- },
-
- };
-
- return {
- NavDot: NavDot,
- };
-});
« no previous file with comments | « chrome/browser/resources/ntp_search/nav_dot.css ('k') | chrome/browser/resources/ntp_search/new_tab.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698