Bug 1565295 - Create Command Line Handler for FxR on desktop r=mossop
authorthomasmo <thomasmo@mozilla.com>
Thu, 11 Jul 2019 21:01:04 +0000
changeset 482505 cbafbe822862de817b4dfa2a5975e02f2d01119d
parent 482504 5fd8ae2c6cde7eb09c06baa8c60c0ee2bf05d29d
child 482506 46c850f36c6f4ea72fb3d355e91a109829472293
push id36282
push userdvarga@mozilla.com
push dateFri, 12 Jul 2019 09:56:21 +0000
treeherdermozilla-central@cb2d564879e3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1565295
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1565295 - Create Command Line Handler for FxR on desktop r=mossop This change introduces the stubs for nsFxrCommandLineHandler, which will support launching Firefox Reality on Desktop. Differential Revision: https://phabricator.services.mozilla.com/D37760
gfx/vr/components.conf
gfx/vr/moz.build
gfx/vr/nsFxrCommandLineHandler.cpp
gfx/vr/nsFxrCommandLineHandler.h
new file mode 100644
--- /dev/null
+++ b/gfx/vr/components.conf
@@ -0,0 +1,15 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+Classes = [
+    {
+        'cid': '{5baca10a-4d53-4335-b24d-c69696640a9a}',
+        'contract_ids': ['@mozilla.org/fxr/clh;1'],
+        'type': 'nsFxrCommandLineHandler',
+        'headers': ['/gfx/vr/nsFxrCommandLineHandler.h'],
+        'categories': {'command-line-handler': 'm-vrbrowser'},
+    },
+]
--- a/gfx/vr/moz.build
+++ b/gfx/vr/moz.build
@@ -46,16 +46,17 @@ UNIFIED_SOURCES += [
     'ipc/VRProcessManager.cpp',
     'ipc/VRProcessParent.cpp',
     'VRDisplayClient.cpp',
     'VRDisplayPresentation.cpp',
     'VRThread.cpp',
 ]
 
 SOURCES += [
+    'nsFxrCommandLineHandler.cpp',
     'VRManager.cpp',
     'VRPuppetCommandBuffer.cpp',
     'VRShMem.cpp'
 ]
 
 if CONFIG['OS_TARGET'] == 'Android':
     LOCAL_INCLUDES += ['/widget/android']
 else:
@@ -75,16 +76,20 @@ if CONFIG['OS_ARCH'] == 'WINNT' and CONF
 
 IPDL_SOURCES = [
     'ipc/PVR.ipdl',
     'ipc/PVRGPU.ipdl',
     'ipc/PVRLayer.ipdl',
     'ipc/PVRManager.ipdl',
 ]
 
+XPCOM_MANIFESTS += [
+  'components.conf',
+]
+
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CFLAGS += CONFIG['TK_CFLAGS']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
new file mode 100644
--- /dev/null
+++ b/gfx/vr/nsFxrCommandLineHandler.cpp
@@ -0,0 +1,23 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+// vim:cindent:tabstop=4:expandtab:shiftwidth=4:
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsFxrCommandLineHandler.h"
+#include "nsICommandLine.h"
+#include "nsString.h"
+
+NS_IMPL_ISUPPORTS(nsFxrCommandLineHandler, nsICommandLineHandler)
+
+NS_IMETHODIMP
+nsFxrCommandLineHandler::Handle(nsICommandLine* aCmdLine) {
+  // Bug 1565296 - Implement Command Line Handler for FxR on desktop
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+nsFxrCommandLineHandler::GetHelpInfo(nsACString& aResult) {
+  // Bug 1565296 - Implement Command Line Handler for FxR on desktop
+  return NS_OK;
+}
new file mode 100644
--- /dev/null
+++ b/gfx/vr/nsFxrCommandLineHandler.h
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+// vim:cindent:tabstop=4:expandtab:shiftwidth=4:
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef GFX_VR_nsFxrCommandLineHandler_h_
+#define GFX_VR_nsFxrCommandLineHandler_h_
+
+#include "nsICommandLineHandler.h"
+
+// 5baca10a-4d53-4335-b24d-c69696640a9a
+#define NS_FXRCOMMANDLINEHANDLER_CID                 \
+  {                                                  \
+    0x5baca10a, 0x4d53, 0x4335, {                    \
+      0xb2, 0x4d, 0xc6, 0x96, 0x96, 0x64, 0x0a, 0x9a \
+    }                                                \
+  }
+
+class nsFxrCommandLineHandler : public nsICommandLineHandler {
+ public:
+  nsFxrCommandLineHandler() = default;
+  NS_DECL_ISUPPORTS
+  NS_DECL_NSICOMMANDLINEHANDLER
+
+ protected:
+  virtual ~nsFxrCommandLineHandler() = default;
+};
+
+#endif /* !defined(GFX_VR_nsFxrCommandLineHandler_h_) */