| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 'use strict'; | |
| 6 | |
| 7 // This hack prevents a bug on the cast extension. | 5 // This hack prevents a bug on the cast extension. |
| 8 // TODO(yoshiki): Remove this once the cast extension supports Chrome apps. | 6 // TODO(yoshiki): Remove this once the cast extension supports Chrome apps. |
| 9 // Although localStorage in Chrome app is not supported, but it's used in the | 7 // Although localStorage in Chrome app is not supported, but it's used in the |
| 10 // cast extension. This line prevents an exception on using localStorage. | 8 // cast extension. This line prevents an exception on using localStorage. |
| 11 window.__defineGetter__('localStorage', function() { return {}; }); | 9 window.__defineGetter__('localStorage', function() { return {}; }); |
| 12 | 10 |
| 13 var APPLICATION_ID = '4CCB98DA'; | 11 var APPLICATION_ID = '4CCB98DA'; |
| 14 | 12 |
| 15 util.addPageLoadHandler(function() { | 13 util.addPageLoadHandler(function() { |
| 16 initialize(); | 14 initialize(); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 141 } |
| 144 | 142 |
| 145 player.setCastList(receivers); | 143 player.setCastList(receivers); |
| 146 } else if (availability == chrome.cast.ReceiverAvailability.UNAVAILABLE) { | 144 } else if (availability == chrome.cast.ReceiverAvailability.UNAVAILABLE) { |
| 147 player.setCastList([]); | 145 player.setCastList([]); |
| 148 } else { | 146 } else { |
| 149 console.error('Unexpected response in onReceiver.', arguments); | 147 console.error('Unexpected response in onReceiver.', arguments); |
| 150 player.setCastList([]); | 148 player.setCastList([]); |
| 151 } | 149 } |
| 152 } | 150 } |
| OLD | NEW |