| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 /** | 5 /** |
| 6 * @fileoverview CFInstall.js provides a set of utilities for managing | 6 * @fileoverview CFInstall.js provides a set of utilities for managing |
| 7 * the Chrome Frame detection and installation process. | 7 * the Chrome Frame detection and installation process. |
| 8 * @author slightlyoff@google.com (Alex Russell) | 8 * @author slightlyoff@google.com (Alex Russell) |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // Look for CF in the User Agent before trying more expensive checks | 42 // Look for CF in the User Agent before trying more expensive checks |
| 43 var ua = navigator.userAgent.toLowerCase(); | 43 var ua = navigator.userAgent.toLowerCase(); |
| 44 if (ua.indexOf("chromeframe") >= 0) { | 44 if (ua.indexOf("chromeframe") >= 0) { |
| 45 return true; | 45 return true; |
| 46 } | 46 } |
| 47 | 47 |
| 48 if (typeof window['ActiveXObject'] != 'undefined') { | 48 if (typeof window['ActiveXObject'] != 'undefined') { |
| 49 try { | 49 try { |
| 50 var obj = new ActiveXObject('ChromeTab.ChromeFrame'); | 50 var obj = new ActiveXObject('ChromeTab.ChromeFrame'); |
| 51 if (obj) { | 51 if (obj) { |
| 52 obj.RegisterBHOIfNeeded(); | 52 obj.registerBhoIfNeeded(); |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| 55 } catch(e) { | 55 } catch(e) { |
| 56 // squelch | 56 // squelch |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 return false; | 59 return false; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 /** | 62 /** |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 | 348 |
| 349 CFInstall._force = false; | 349 CFInstall._force = false; |
| 350 CFInstall._forceValue = false; | 350 CFInstall._forceValue = false; |
| 351 CFInstall.isAvailable = isAvailable; | 351 CFInstall.isAvailable = isAvailable; |
| 352 | 352 |
| 353 // expose CFInstall to the external scope. We've already checked to make | 353 // expose CFInstall to the external scope. We've already checked to make |
| 354 // sure we're not going to blow existing objects away. | 354 // sure we're not going to blow existing objects away. |
| 355 scope.CFInstall = CFInstall; | 355 scope.CFInstall = CFInstall; |
| 356 | 356 |
| 357 })(this['ChromeFrameInstallScope'] || this); | 357 })(this['ChromeFrameInstallScope'] || this); |
| OLD | NEW |