| OLD | NEW |
| 1 'use strict'; | 1 'use strict'; |
| 2 /* | 2 /* |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 } | 53 } |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 // ---------------------------------------------------------------- | 56 // ---------------------------------------------------------------- |
| 57 // Utility functions | 57 // Utility functions |
| 58 | 58 |
| 59 /** | 59 /** |
| 60 * @return {!boolean} | 60 * @return {!boolean} |
| 61 */ | 61 */ |
| 62 function hasInaccuratePointingDevice() { | 62 function hasInaccuratePointingDevice() { |
| 63 return matchMedia('(pointer: coarse)').matches; | 63 return matchMedia('(any-pointer: coarse)').matches; |
| 64 } | 64 } |
| 65 | 65 |
| 66 /** | 66 /** |
| 67 * @return {!string} lowercase locale name. e.g. "en-us" | 67 * @return {!string} lowercase locale name. e.g. "en-us" |
| 68 */ | 68 */ |
| 69 function getLocale() { | 69 function getLocale() { |
| 70 return (global.params.locale || 'en-us').toLowerCase(); | 70 return (global.params.locale || 'en-us').toLowerCase(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 /** | 73 /** |
| (...skipping 4002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4076 event.stopPropagation(); | 4076 event.stopPropagation(); |
| 4077 event.preventDefault(); | 4077 event.preventDefault(); |
| 4078 } | 4078 } |
| 4079 }; | 4079 }; |
| 4080 | 4080 |
| 4081 if (window.dialogArguments) { | 4081 if (window.dialogArguments) { |
| 4082 initialize(dialogArguments); | 4082 initialize(dialogArguments); |
| 4083 } else { | 4083 } else { |
| 4084 window.addEventListener('message', handleMessage, false); | 4084 window.addEventListener('message', handleMessage, false); |
| 4085 } | 4085 } |
| OLD | NEW |