Upgrade wrt_support for electron v1.6.7 67/147567/4
authorYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 5 Sep 2017 02:50:59 +0000 (11:50 +0900)
committerSungsik Han <ss440.han@samsung.com>
Tue, 12 Sep 2017 04:56:29 +0000 (04:56 +0000)
The electron has been upgraded from v0.35.4 to v1.6.7.
So, this applies the API changes to wrt_support.

Change-Id: Iee51a807d048f69d9ed67915dc2377b6fdb9e95f
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
wrt/wrt_support/apps_repo/database.json
wrt/wrt_support/extensions_settings/src/extension_manager.js
wrt/wrt_support/extensions_settings/src/was_key_event_handler.js
wrt/wrt_support/sample/installer/assets/js/was_key_event_handler.js
wrt/wrt_support/sample/launcher/assets/js/launcher.js
wrt/wrt_support/sample/launcher/assets/js/was_key_event_handler.js

index 02c2359..618a3ea 100644 (file)
@@ -1 +1 @@
-[{"app_id":"0123456789.ANYTHING","version":"1.0.0","content":"index.html","icon":"icon.png","name":"installer","type":"packaged","localeInfo":[{"locale":"default","name":"installer"}],"_id":"73dcc29053524fd3b6512061eccea2e1"},{"app_id":"0123456789.ANYTHING","version":"1.0.0","content":"index.html","icon":"icon.png","name":"webgl","type":"packaged","localeInfo":[{"locale":"default","name":"webgl"},{"locale":"en-us","name":"Web GL"},{"locale":"ko-kr","name":"웹 지엘"},{"locale":"jp-jp","name":"ウェブ GL"}],"_id":"9692aaf7360d4c09b4011a4bc0f2a521"},{"app_id":"0123456789.ANYTHING","version":"1.0.0","content":"index.html","icon":"icon.png","name":"extensions_settings","type":"packaged","localeInfo":[{"locale":"default","name":"extensions_settings"}],"_id":"00ddf6ddab574372b68a2b48db17f088"}]
\ No newline at end of file
+[{"app_id":"0123456789.ANYTHING","version":"1.0.0","content":"index.html","icon":"icon.png","name":"webgl","type":"packaged","localeInfo":[{"locale":"default","name":"webgl"},{"locale":"en-us","name":"Web GL"},{"locale":"ko-kr","name":"웹 지엘"},{"locale":"jp-jp","name":"ウェブ GL"}],"_id":"9692aaf7360d4c09b4011a4bc0f2a521"},{"app_id":"0123456789.ANYTHING","version":"1.0.0","content":"index.html","icon":"icon.png","name":"installer","type":"packaged","localeInfo":[{"locale":"default","name":"installer"}],"_id":"b6cdf3f84b564691b3bc1e203d02f547"},{"app_id":"0123456789.ANYTHING","version":"1.0.0","content":"index.html","icon":"icon.png","name":"extensions_settings","type":"packaged","localeInfo":[{"locale":"default","name":"extensions_settings"}],"_id":"6359f8d65f074abfa15a220a240e7c64"}]
\ No newline at end of file
index dca4291..1920e5c 100755 (executable)
@@ -11,7 +11,7 @@
   var util = require('util');
   var mkdirp = require('mkdirp');
 
-  var ipc = require('ipc');
+  var {ipcRenderer} = require('electron');
   var IPC_EXTENSIONS_INSTALLED = 'ipc:extensions:installed';
   var IPC_EXTENSIONS_UNINSTALLED = 'ipc:extensions:uninstalled';
   var IPC_EXTENSIONS_ACTIVATE = 'ipc:extensions:activate';
           }
           ext_manager.saveJsonDB();
 
-          ipc.send(IPC_EXTENSIONS_INSTALLED, extension.name);
+          ipcRenderer.send(IPC_EXTENSIONS_INSTALLED, extension.name);
         } else {
           console.log('InstallRepoItem - error : extension = ' + extension + ' extensions_list_=' + ext_manager.extensions_list_);
         }
       }
       this.saveJsonDB();
 
-      ipc.send(IPC_EXTENSIONS_UNINSTALLED, extension.name);
+      ipcRenderer.send(IPC_EXTENSIONS_UNINSTALLED, extension.name);
     }
 
     /* installer - get manifest info from path */
     };
 
     ExtensionManager.prototype.activate = function(name) {
-      ipc.send(IPC_EXTENSIONS_ACTIVATE, name);
+      ipcRenderer.send(IPC_EXTENSIONS_ACTIVATE, name);
     };
 
     ExtensionManager.prototype.deactivate = function(name) {
-      ipc.send(IPC_EXTENSIONS_DEACTIVATE, name);
+      ipcRenderer.send(IPC_EXTENSIONS_DEACTIVATE, name);
     };
 
     ExtensionManager.getManifestFile = function() {
index 48c127f..47bbf1d 100644 (file)
@@ -3,7 +3,7 @@
         if (e.keyCode == 27) {
             e.preventDefault();
             e.stopPropagation();
-            var launcher = require('remote').getCurrentWindow();
+            var launcher = require('electron').remote.getCurrentWindow();
             launcher.close();
         }
     })
@@ -11,8 +11,8 @@
         if (e.which == 3) {
             e.preventDefault();
             e.stopPropagation();
-            var launcher = require('remote').getCurrentWindow();
+            var launcher = require('electron').remote.getCurrentWindow();
             launcher.close();
         }
     })
-})()
\ No newline at end of file
+})()
index 48c127f..47bbf1d 100644 (file)
@@ -3,7 +3,7 @@
         if (e.keyCode == 27) {
             e.preventDefault();
             e.stopPropagation();
-            var launcher = require('remote').getCurrentWindow();
+            var launcher = require('electron').remote.getCurrentWindow();
             launcher.close();
         }
     })
@@ -11,8 +11,8 @@
         if (e.which == 3) {
             e.preventDefault();
             e.stopPropagation();
-            var launcher = require('remote').getCurrentWindow();
+            var launcher = require('electron').remote.getCurrentWindow();
             launcher.close();
         }
     })
-})()
\ No newline at end of file
+})()
index 1f9cf86..af7961e 100755 (executable)
@@ -2,9 +2,9 @@ $ = require('./bower_components/jquery/dist/jquery.min.js');
 $(function() {
     var launcher = {},
         path = require('path'),
-        ipc = require('ipc'),
-        remote = require('remote'),
-        WAS_EVENT =  remote.require('./event_define'),
+        {ipcRenderer} = require('electron'),
+        remote = require('electron').remote,
+        IPC_MESSAGE =  remote.require('./ipc_message'),
         InstallManager = require('../../installer/manager.js'),
         installManager = new InstallManager();
     Backbone.$ = $;
@@ -87,7 +87,7 @@ $(function() {
             e.stopPropagation();
             var options = {};
             options.packageName = this.model.get('name');
-            ipc.send('open', options);
+            ipcRenderer.send('open', options);
         }
     });
     launcher.WasMenuView = Backbone.View.extend({
@@ -122,7 +122,7 @@ $(function() {
                 launcher.close();
             }
             //     options.packageName = this.model.get('name');
-            //     ipc.send('open', options);
+            //     ipcRenderer.send('open', options);
         }
     });
     launcher.WebAppView = Backbone.View.extend({
@@ -198,7 +198,7 @@ $(function() {
             options.type = this.model.get('type');
             options.content = this.model.get('content');
 
-            ipc.send('open', options);
+            ipcRenderer.send('open', options);
         }
     });
     launcher.PopOverView = Backbone.View.extend({
@@ -360,8 +360,8 @@ $(function() {
     //     console.log(method + ":" + JSON.stringify(model));
     // };
     var launcherApp = new launcher.LauncherView();
-    ipc.on(WAS_EVENT.LAUNCHER.UPDATE, function() {
-        console.log(WAS_EVENT.LAUNCHER.UPDATE);
+    ipcRenderer.on(IPC_MESSAGE.LAUNCHER.UPDATE, function() {
+        console.log(IPC_MESSAGE.LAUNCHER.UPDATE);
         launcherApp.webAppListUpdate()
     })
 });
index 83d5d6c..80f45d6 100644 (file)
@@ -3,7 +3,7 @@
         if (e.keyCode == 27) {
             e.preventDefault();
             e.stopPropagation();
-            var launcher = require('remote').getCurrentWindow();
+            var launcher = require('electron').remote.getCurrentWindow();
             launcher.close();
         }
     })
@@ -12,8 +12,8 @@
             e.preventDefault();
             e.stopPropagation();
             console.log("F5");
-            var launcher = require('remote').getCurrentWindow();
+            var launcher = require('electron').remote.getCurrentWindow();
             launcher.reload();
         }
     })
-})()
\ No newline at end of file
+})()