diff --git a/browser/components/uitour/test/browser_UITour_loop.js b/browser/components/uitour/test/browser_UITour_loop.js index 0f6a6ba38c1..97b4093a4e8 100644 --- a/browser/components/uitour/test/browser_UITour_loop.js +++ b/browser/components/uitour/test/browser_UITour_loop.js @@ -9,8 +9,8 @@ var gContentWindow; var loopButton; var loopPanel = document.getElementById("loop-notification-panel"); -const { LoopRooms } = Components.utils.import("resource:///modules/loop/LoopRooms.jsm", {}); -const { MozLoopServiceInternal } = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); +const { LoopRooms } = Components.utils.import("chrome://loop/content/modules/LoopRooms.jsm", {}); +const { MozLoopServiceInternal } = Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); function test() { UITourTest(); diff --git a/browser/extensions/loop/README.txt b/browser/extensions/loop/README.txt index 4903e0866a1..7b23f46e2e2 100644 --- a/browser/extensions/loop/README.txt +++ b/browser/extensions/loop/README.txt @@ -22,9 +22,9 @@ using npm in order to compile the .jsx files into regular .js ones: npm install -g react-tools@0.12.2 Once installed, run build-jsx with the --watch option from -browser/components/loop, eg.: +browser/extensions/loop, eg.: - cd browser/components/loop + cd browser/extensions/loop ./build-jsx --watch build-jsx can also be do a one-time compile pass instead of watching if @@ -36,7 +36,7 @@ Hacking ======= Please be sure to execute - browser/components/loop/run-all-loop-tests.sh + browser/extensions/loop/run-all-loop-tests.sh from the top level before requesting review on a patch. @@ -52,7 +52,7 @@ If you install eslint and the react plugin globally: npm install -g eslint npm install -g eslint-plugin-react -You can also run it by hand in the browser/components/loop directory: +You can also run it by hand in the browser/extensions/loop directory: eslint --ext .js --ext .jsx --ext .jsm . @@ -88,7 +88,7 @@ install that is properly configured. From the top-level gecko directory, execute: export LOOP_SERVER=/Users/larry/src/loop-server - ./mach marionette-test browser/components/loop/test/functional/manifest.ini + ./mach marionette-test browser/extensions/loop/test/functional/manifest.ini Once the automation is complete, we'll include this in run-all-loop-tests.sh as well. diff --git a/browser/extensions/loop/bootstrap.js b/browser/extensions/loop/bootstrap.js index 90be7de3e68..3626102d6a2 100644 --- a/browser/extensions/loop/bootstrap.js +++ b/browser/extensions/loop/bootstrap.js @@ -409,7 +409,7 @@ var WindowListener = { } this.activeSound = new window.Audio(); - this.activeSound.src = `chrome://browser/content/loop/shared/sounds/${name}.ogg`; + this.activeSound.src = `chrome://loop/content/shared/sounds/${name}.ogg`; this.activeSound.load(); this.activeSound.play(); @@ -610,9 +610,9 @@ var WindowListener = { }; XPCOMUtils.defineLazyModuleGetter(LoopUI, "hookWindowCloseForPanelClose", "resource://gre/modules/MozSocialAPI.jsm"); - XPCOMUtils.defineLazyModuleGetter(LoopUI, "LoopAPI", "resource:///modules/loop/MozLoopAPI.jsm"); - XPCOMUtils.defineLazyModuleGetter(LoopUI, "LoopRooms", "resource:///modules/loop/LoopRooms.jsm"); - XPCOMUtils.defineLazyModuleGetter(LoopUI, "MozLoopService", "resource:///modules/loop/MozLoopService.jsm"); + XPCOMUtils.defineLazyModuleGetter(LoopUI, "LoopAPI", "chrome://loop/content/modules/MozLoopAPI.jsm"); + XPCOMUtils.defineLazyModuleGetter(LoopUI, "LoopRooms", "chrome://loop/content/modules/LoopRooms.jsm"); + XPCOMUtils.defineLazyModuleGetter(LoopUI, "MozLoopService", "chrome://loop/content/modules/MozLoopService.jsm"); XPCOMUtils.defineLazyModuleGetter(LoopUI, "PanelFrame", "resource:///modules/PanelFrame.jsm"); XPCOMUtils.defineLazyModuleGetter(LoopUI, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm"); } diff --git a/browser/extensions/loop/build-jsx b/browser/extensions/loop/build-jsx index be95fd1a06b..e8bc4801229 100755 --- a/browser/extensions/loop/build-jsx +++ b/browser/extensions/loop/build-jsx @@ -74,7 +74,7 @@ def find_react_command(): return [node, jsx_path] -SHARED_LIBS_DIR=os.path.join(os.path.dirname(__file__), "content", "shared", "libs") +SHARED_LIBS_DIR=os.path.join(os.path.dirname(__file__), "content", "shared", "vendor") REACT_VERSION=find_react_version(SHARED_LIBS_DIR) src_files = [] # files to be compiled @@ -99,7 +99,7 @@ else: # parse the CLI arguments description = 'Loop build tool for JSX files. ' + \ 'Will scan entire loop directory and compile them in place. ' + \ - 'Must be executed from browser/components/loop directory.' + 'Must be executed from browser/extensions/loop directory.' parser = argparse.ArgumentParser(description=description) parser.add_argument('--watch', '-w', action='store_true', help='continuous' + diff --git a/browser/extensions/loop/content/modules/LoopRooms.jsm b/browser/extensions/loop/content/modules/LoopRooms.jsm index 22b5541e270..7665ef5e961 100644 --- a/browser/extensions/loop/content/modules/LoopRooms.jsm +++ b/browser/extensions/loop/content/modules/LoopRooms.jsm @@ -10,7 +10,7 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Task.jsm"); Cu.import("resource://gre/modules/Timer.jsm"); -const { MozLoopService, LOOP_SESSION_TYPE } = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); +const { MozLoopService, LOOP_SESSION_TYPE } = Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); XPCOMUtils.defineLazyModuleGetter(this, "Promise", "resource://gre/modules/Promise.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils", @@ -27,11 +27,11 @@ XPCOMUtils.defineLazyGetter(this, "gLoopBundle", function() { }); XPCOMUtils.defineLazyModuleGetter(this, "LoopRoomsCache", - "resource:///modules/loop/LoopRoomsCache.jsm"); + "chrome://loop/content/modules/LoopRoomsCache.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "loopUtils", - "resource:///modules/loop/utils.js", "utils"); + "chrome://loop/content/modules/utils.js", "utils"); XPCOMUtils.defineLazyModuleGetter(this, "loopCrypto", - "resource:///modules/loop/crypto.js", "LoopCrypto"); + "chrome://loop/content/shared/js/crypto.js", "LoopCrypto"); XPCOMUtils.defineLazyModuleGetter(this, "ObjectUtils", "resource://gre/modules/ObjectUtils.jsm"); diff --git a/browser/extensions/loop/content/modules/LoopRoomsCache.jsm b/browser/extensions/loop/content/modules/LoopRoomsCache.jsm index f1265a6611b..de123d2e3d6 100644 --- a/browser/extensions/loop/content/modules/LoopRoomsCache.jsm +++ b/browser/extensions/loop/content/modules/LoopRoomsCache.jsm @@ -9,7 +9,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Task.jsm"); const { MozLoopService, LOOP_SESSION_TYPE } = - Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); + Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils", "resource://services-common/utils.js"); XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm"); diff --git a/browser/extensions/loop/content/modules/MozLoopAPI.jsm b/browser/extensions/loop/content/modules/MozLoopAPI.jsm index 70638ee9fe3..49f4a30b260 100644 --- a/browser/extensions/loop/content/modules/MozLoopAPI.jsm +++ b/browser/extensions/loop/content/modules/MozLoopAPI.jsm @@ -9,8 +9,8 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components; Cu.import("resource://services-common/utils.js"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource:///modules/loop/MozLoopService.jsm"); -Cu.import("resource:///modules/loop/LoopRooms.jsm"); +Cu.import("chrome://loop/content/modules/MozLoopService.jsm"); +Cu.import("chrome://loop/content/modules/LoopRooms.jsm"); Cu.importGlobalProperties(["Blob"]); XPCOMUtils.defineLazyModuleGetter(this, "PageMetadata", diff --git a/browser/extensions/loop/content/modules/MozLoopPushHandler.jsm b/browser/extensions/loop/content/modules/MozLoopPushHandler.jsm index 8be93ff80f7..cb10cea3f6a 100644 --- a/browser/extensions/loop/content/modules/MozLoopPushHandler.jsm +++ b/browser/extensions/loop/content/modules/MozLoopPushHandler.jsm @@ -10,7 +10,7 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Timer.jsm"); -const { MozLoopService } = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); +const { MozLoopService } = Cu.import("chrome://loop/content/modules/MozLoopService.jsm", {}); const consoleLog = MozLoopService.log; this.EXPORTED_SYMBOLS = ["MozLoopPushHandler"]; diff --git a/browser/extensions/loop/content/modules/MozLoopService.jsm b/browser/extensions/loop/content/modules/MozLoopService.jsm index 15c8bae3077..43e3c560937 100644 --- a/browser/extensions/loop/content/modules/MozLoopService.jsm +++ b/browser/extensions/loop/content/modules/MozLoopService.jsm @@ -121,14 +121,14 @@ XPCOMUtils.defineConstant(this, "ROOM_DELETE", ROOM_DELETE); XPCOMUtils.defineConstant(this, "ROOM_CONTEXT_ADD", ROOM_CONTEXT_ADD); XPCOMUtils.defineLazyModuleGetter(this, "LoopAPI", - "resource:///modules/loop/MozLoopAPI.jsm"); + "chrome://loop/content/modules/MozLoopAPI.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "convertToRTCStatsReport", "resource://gre/modules/media/RTCStatsReport.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "loopUtils", - "resource:///modules/loop/utils.js", "utils"); + "chrome://loop/content/modules/utils.js", "utils"); XPCOMUtils.defineLazyModuleGetter(this, "loopCrypto", - "resource:///modules/loop/crypto.js", "LoopCrypto"); + "chrome://loop/content/shared/js/crypto.js", "LoopCrypto"); XPCOMUtils.defineLazyModuleGetter(this, "Chat", "resource:///modules/Chat.jsm"); @@ -151,13 +151,13 @@ XPCOMUtils.defineLazyModuleGetter(this, "hookWindowCloseForPanelClose", "resource://gre/modules/MozSocialAPI.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "LoopRooms", - "resource:///modules/loop/LoopRooms.jsm"); + "chrome://loop/content/modules/LoopRooms.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "roomsPushNotification", - "resource:///modules/loop/LoopRooms.jsm"); + "chrome://loop/content/modules/LoopRooms.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "MozLoopPushHandler", - "resource:///modules/loop/MozLoopPushHandler.jsm"); + "chrome://loop/content/modules/MozLoopPushHandler.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "UITour", "resource:///modules/UITour.jsm"); diff --git a/browser/extensions/loop/content/panels/conversation.html b/browser/extensions/loop/content/panels/conversation.html index dfc2c8715f9..7cbb81835f2 100644 --- a/browser/extensions/loop/content/panels/conversation.html +++ b/browser/extensions/loop/content/panels/conversation.html @@ -7,9 +7,10 @@