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

Side by Side Diff: chrome/common/extensions/docs/examples/api/fontSettings/options.js

Issue 10907052: Font Settings API: Use Chrome settings CSS in sample extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « chrome/common/extensions/docs/examples/api/fontSettings/options.html ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Mapping between font list ids and the generic family setting they 5 // Mapping between font list ids and the generic family setting they
6 // represent. 6 // represent.
7 var genericFamilies = [ 7 var genericFamilies = [
8 { fontList: 'standardFontList', name: 'standard' }, 8 { fontList: 'standardFontList', name: 'standard' },
9 { fontList: 'serifFontList', name: 'serif' }, 9 { fontList: 'serifFontList', name: 'serif' },
10 { fontList: 'sansSerifFontList', name: 'sansserif' }, 10 { fontList: 'sansSerifFontList', name: 'sansserif' },
11 { fontList: 'fixedFontList', name: 'fixed' } 11 { fontList: 'fixedFontList', name: 'fixed' }
12 ]; 12 ];
13 13
14 // Ids of elements to contain the "Lorem ipsum" sample text. 14 // Ids of elements to contain the "Lorem ipsum" sample text.
15 var sampleTextDivIds = [ 15 var sampleTextDivIds = [
16 'standardFontSample', 16 'standardFontSample',
17 'serifFontSample', 17 'serifFontSample',
18 'sansSerifFontSample', 18 'sansSerifFontSample',
19 'fixedFontSample' 19 'fixedFontSample',
20 'minFontSample'
20 ]; 21 ];
21 22
22 var defaultSampleText = 'Lorem ipsum dolor sit amat.'; 23 var defaultSampleText = 'Lorem ipsum dolor sit amat.';
23 var scriptSpecificSampleText = { 24 var scriptSpecificSampleText = {
24 // "Cyrllic script". 25 // "Cyrllic script".
25 'Cyrl': 'Кириллица', 26 'Cyrl': 'Кириллица',
26 'Hang': '정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날.', 27 'Hang': '정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날.',
27 'Hans': '床前明月光,疑是地上霜。举头望明月,低头思故乡。', 28 'Hans': '床前明月光,疑是地上霜。举头望明月,低头思故乡。',
28 'Hant': '床前明月光,疑是地上霜。舉頭望明月,低頭思故鄉。', 29 'Hant': '床前明月光,疑是地上霜。舉頭望明月,低頭思故鄉。',
29 'Jpan': '吾輩は猫である。名前はまだ無い。', 30 'Jpan': '吾輩は猫である。名前はまだ無い。',
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 initFontSizePref('minFontSize', 241 initFontSizePref('minFontSize',
241 chrome.fontSettings.getMinimumFontSize, 242 chrome.fontSettings.getMinimumFontSize,
242 chrome.fontSettings.setMinimumFontSize, 243 chrome.fontSettings.setMinimumFontSize,
243 chrome.fontSettings.onMinimumFontSizeChanged); 244 chrome.fontSettings.onMinimumFontSizeChanged);
244 245
245 var clearButton = document.getElementById('clearButton'); 246 var clearButton = document.getElementById('clearButton');
246 clearButton.addEventListener('click', clearAllSettings); 247 clearButton.addEventListener('click', clearAllSettings);
247 } 248 }
248 249
249 document.addEventListener('DOMContentLoaded', init); 250 document.addEventListener('DOMContentLoaded', init);
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/examples/api/fontSettings/options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698