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

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

Issue 2361973002: MD Downloads: preload bold Roboto in a better way (Closed)
Patch Set: !chromeos Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 function assert(condition, opt_message) { 4 function assert(condition, opt_message) {
5 if (!condition) { 5 if (!condition) {
6 var message = 'Assertion failed'; 6 var message = 'Assertion failed';
7 if (opt_message) message = message + ': ' + opt_message; 7 if (opt_message) message = message + ': ' + opt_message;
8 var error = new Error(message); 8 var error = new Error(message);
9 var global = function() { 9 var global = function() {
10 return this; 10 return this;
(...skipping 6978 matching lines...) Expand 10 before | Expand all | Expand 10 after
6989 Manager.get().updateItem_(index, data); 6989 Manager.get().updateItem_(index, data);
6990 }; 6990 };
6991 return { 6991 return {
6992 Manager: Manager 6992 Manager: Manager
6993 }; 6993 };
6994 }); 6994 });
6995 6995
6996 // Copyright 2015 The Chromium Authors. All rights reserved. 6996 // Copyright 2015 The Chromium Authors. All rights reserved.
6997 // Use of this source code is governed by a BSD-style license that can be 6997 // Use of this source code is governed by a BSD-style license that can be
6998 // found in the LICENSE file. 6998 // found in the LICENSE file.
6999 window.addEventListener('load', downloads.Manager.onLoad); 6999 window.addEventListener('load', function() {
7000 downloads.Manager.onLoad();
7001 if (!cr.isChromeOS) {
7002 new FontFace('Roboto', "local('Roboto Bold'), local('Roboto-Bold'), " + "url (chrome://resources/roboto/roboto-bold.woff2) format('woff2')", {
7003 weight: 'bold'
7004 }).load();
7005 }
7006 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/compiled_resources2.gyp ('k') | chrome/browser/resources/md_downloads/downloads.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698