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

Side by Side Diff: chrome/browser/resources/ntp4/bookmarks_page.js

Issue 7837008: ntp: add tooltips for all tile types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('ntp4', function() { 5 cr.define('ntp4', function() {
6 'use strict'; 6 'use strict';
7 7
8 var localStrings = new LocalStrings; 8 var localStrings = new LocalStrings;
9 9
10 /** 10 /**
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 /** 61 /**
62 * Initialize the bookmark object. 62 * Initialize the bookmark object.
63 */ 63 */
64 initialize: function() { 64 initialize: function() {
65 var id = tileId++; 65 var id = tileId++;
66 this.id = 'bookmark_tile_' + id; 66 this.id = 'bookmark_tile_' + id;
67 67
68 var title = this.querySelector('.title'); 68 var title = this.querySelector('.title');
69 title.textContent = this.data.title; 69 title.textContent = this.data.title;
70 70
71 // Sets the tooltip.
72 this.title = this.data.title;
73
71 if (this.data.url) { 74 if (this.data.url) {
72 var button = this.querySelector('.button'); 75 var button = this.querySelector('.button');
73 button.href = title.href = this.data.url; 76 button.href = title.href = this.data.url;
74 } 77 }
75 78
76 var faviconDiv = this.querySelector('.favicon'); 79 var faviconDiv = this.querySelector('.favicon');
77 var faviconUrl; 80 var faviconUrl;
78 if (this.data.url) { 81 if (this.data.url) {
79 faviconUrl = 'chrome://favicon/size/16/' + this.data.url; 82 faviconUrl = 'chrome://favicon/size/16/' + this.data.url;
80 chrome.send('getFaviconDominantColor', [faviconUrl, this.id]); 83 chrome.send('getFaviconDominantColor', [faviconUrl, this.id]);
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 tile.stripeColor = color; 596 tile.stripeColor = color;
594 } 597 }
595 598
596 return { 599 return {
597 BookmarksPage: BookmarksPage, 600 BookmarksPage: BookmarksPage,
598 initBookmarkChevron: initBookmarkChevron, 601 initBookmarkChevron: initBookmarkChevron,
599 }; 602 };
600 }); 603 });
601 604
602 window.addEventListener('load', ntp4.initBookmarkChevron); 605 window.addEventListener('load', ntp4.initBookmarkChevron);
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | chrome/browser/resources/ntp4/most_visited_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698