Bläddra i källkod

feat(SS): handle inline installation not supported error.

dev1
hristoterezov 8 år sedan
förälder
incheckning
0de9b5775e
1 ändrade filer med 12 tillägg och 1 borttagningar
  1. 12
    1
      modules/RTC/ScreenObtainer.js

+ 12
- 1
modules/RTC/ScreenObtainer.js Visa fil

59
     = 'Installs can only be initiated by one of'
59
     = 'Installs can only be initiated by one of'
60
         + ' the Chrome Web Store item\'s verified sites.';
60
         + ' the Chrome Web Store item\'s verified sites.';
61
 
61
 
62
+/**
63
+ * The error returned by chrome when trying to start inline installation
64
+ * with extension that doesn't support inline installation.
65
+ *
66
+ * @type {string}
67
+ */
68
+const CHROME_EXTENSION_INLINE_NOT_SUPPORTED_ERROR
69
+    = 'Inline installation is not supported for this item. '
70
+        + 'The user will be redirected to the Chrome Web Store.';
71
+
62
 /**
72
 /**
63
  * The error message returned by chrome when the extension is installed.
73
  * The error message returned by chrome when the extension is installed.
64
  */
74
  */
417
 
427
 
418
         if ((CHROME_EXTENSION_POPUP_ERROR === e
428
         if ((CHROME_EXTENSION_POPUP_ERROR === e
419
              || CHROME_EXTENSION_IFRAME_ERROR === e
429
              || CHROME_EXTENSION_IFRAME_ERROR === e
420
-             || CHROME_EXTENSION_INLINE_ERROR === e)
430
+             || CHROME_EXTENSION_INLINE_ERROR === e
431
+             || CHROME_EXTENSION_INLINE_NOT_SUPPORTED_ERROR === e)
421
                 && options.interval > 0
432
                 && options.interval > 0
422
                 && typeof options.checkAgain === 'function'
433
                 && typeof options.checkAgain === 'function'
423
                 && typeof options.listener === 'function') {
434
                 && typeof options.listener === 'function') {

Laddar…
Avbryt
Spara