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

Side by Side Diff: chrome/browser/resources/md_downloads/downloads.js

Issue 2374763002: MD Downloads: simplify font preloading further (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « chrome/browser/resources/md_downloads/crisper.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 window.addEventListener('load', function() { 5 window.addEventListener('load', function() {
6 downloads.Manager.onLoad(); 6 downloads.Manager.onLoad();
7 7 document.fonts.load('bold 12px Roboto');
8 if (!cr.isChromeOS) {
9 // TODO(dbeam): this is copied out of roboto.css. I excluded roboto.css from
10 // vulcanize.py and tried to re-use the "src:" rule from the file via
11 // querySelector(href$=roboto.css).sheet.rules[2].style.src, but alas .rules
12 // can't be accessed because the origins don't match (chrome://resources vs
13 // chrome://downloads). So it's duplicated.
14 new FontFace('Roboto', "local('Roboto Bold'), local('Roboto-Bold'), " +
15 "url(chrome://resources/roboto/roboto-bold.woff2) format('woff2')",
16 {weight: 'bold'}).load();
17 }
18 }); 8 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/crisper.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698