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

Side by Side Diff: chrome/browser/resources/md_downloads/crisper.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 | « no previous file | chrome/browser/resources/md_downloads/downloads.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7008 matching lines...) Expand 10 before | Expand all | Expand 10 after
7019 return { 7019 return {
7020 Manager: Manager 7020 Manager: Manager
7021 }; 7021 };
7022 }); 7022 });
7023 7023
7024 // Copyright 2015 The Chromium Authors. All rights reserved. 7024 // Copyright 2015 The Chromium Authors. All rights reserved.
7025 // Use of this source code is governed by a BSD-style license that can be 7025 // Use of this source code is governed by a BSD-style license that can be
7026 // found in the LICENSE file. 7026 // found in the LICENSE file.
7027 window.addEventListener('load', function() { 7027 window.addEventListener('load', function() {
7028 downloads.Manager.onLoad(); 7028 downloads.Manager.onLoad();
7029 if (!cr.isChromeOS) { 7029 document.fonts.load('bold 12px Roboto');
7030 new FontFace('Roboto', "local('Roboto Bold'), local('Roboto-Bold'), " + "url (chrome://resources/roboto/roboto-bold.woff2) format('woff2')", { 7030 });
7031 weight: 'bold'
7032 }).load();
7033 }
7034 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/md_downloads/downloads.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698