Skip to content

Commit

Permalink
Bug 1565295 - Create Command Line Handler for FxR on desktop r=mossop
Browse files Browse the repository at this point in the history
This change introduces the stubs for nsFxrCommandLineHandler,
which will support launching Firefox Reality on Desktop.

Differential Revision: https://phabricator.services.mozilla.com/D37760

--HG--
extra : moz-landing-system : lando
  • Loading branch information
thomasmo committed Jul 11, 2019
1 parent 57a98ef commit eb4b318
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
15 changes: 15 additions & 0 deletions gfx/vr/components.conf
Original file line number Diff line number Diff line change
@@ -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'},
},
]
5 changes: 5 additions & 0 deletions gfx/vr/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ UNIFIED_SOURCES += [
]

SOURCES += [
'nsFxrCommandLineHandler.cpp',
'VRManager.cpp',
'VRPuppetCommandBuffer.cpp',
'VRShMem.cpp'
Expand Down Expand Up @@ -80,6 +81,10 @@ IPDL_SOURCES = [
'ipc/PVRManager.ipdl',
]

XPCOM_MANIFESTS += [
'components.conf',
]

CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['TK_CFLAGS']
CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
Expand Down
23 changes: 23 additions & 0 deletions gfx/vr/nsFxrCommandLineHandler.cpp
Original file line number Diff line number Diff line change
@@ -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;
}
30 changes: 30 additions & 0 deletions gfx/vr/nsFxrCommandLineHandler.h
Original file line number Diff line number Diff line change
@@ -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_) */

0 comments on commit eb4b318

Please sign in to comment.