Bug 1768189 - Part 19: Apply modernize-concat-nested-namespaces to dom/media/gmp/GMPStorageParent.h ... r=media-playback-reviewers,bryce

Depends on D145752

Differential Revision: https://phabricator.services.mozilla.com/D145753
This commit is contained in:
Kagami Sascha Rosylight 2022-05-09 20:41:10 +00:00
parent 921c9d66d0
commit 7795dbcc68
25 changed files with 57 additions and 104 deletions

View File

@ -9,8 +9,7 @@
#include "mozilla/gmp/PGMPStorageParent.h"
#include "GMPStorage.h"
namespace mozilla {
namespace gmp {
namespace mozilla::gmp {
class GMPParent;
@ -43,7 +42,6 @@ class GMPStorageParent : public PGMPStorageParent {
bool mShutdown;
};
} // namespace gmp
} // namespace mozilla
} // namespace mozilla::gmp
#endif // GMPStorageParent_h_

View File

@ -13,8 +13,7 @@
#include "gmp-errors.h"
#include "gmp-platform.h"
namespace mozilla {
namespace gmp {
namespace mozilla::gmp {
class GMPChild;
@ -41,7 +40,6 @@ class GMPTimerChild : public PGMPTimerChild {
GMPChild* mPlugin;
};
} // namespace gmp
} // namespace mozilla
} // namespace mozilla::gmp
#endif // GMPTimerChild_h_

View File

@ -12,8 +12,7 @@
#include "nsTHashSet.h"
#include "mozilla/Monitor.h"
namespace mozilla {
namespace gmp {
namespace mozilla::gmp {
class GMPTimerParent : public PGMPTimerParent {
friend class PGMPTimerParent;
@ -52,7 +51,6 @@ class GMPTimerParent : public PGMPTimerParent {
bool mIsOpen;
};
} // namespace gmp
} // namespace mozilla
} // namespace mozilla::gmp
#endif // GMPTimerParent_h_

View File

@ -13,8 +13,7 @@
#include "GMPVideoHost.h"
#include "mozilla/gmp/GMPTypes.h"
namespace mozilla {
namespace gmp {
namespace mozilla::gmp {
class GMPContentChild;
@ -72,7 +71,6 @@ class GMPVideoDecoderChild : public PGMPVideoDecoderChild,
bool mPendingDecodeComplete;
};
} // namespace gmp
} // namespace mozilla
} // namespace mozilla::gmp
#endif // GMPVideoDecoderChild_h_

View File

@ -17,8 +17,7 @@
#include "VideoUtils.h"
#include "GMPCrashHelperHolder.h"
namespace mozilla {
namespace gmp {
namespace mozilla::gmp {
class GMPContentParent;
@ -98,7 +97,6 @@ class GMPVideoDecoderParent final : public PGMPVideoDecoderParent,
RefPtr<SimpleTimer> mResetCompleteTimeout;
};
} // namespace gmp
} // namespace mozilla
} // namespace mozilla::gmp
#endif // GMPVideoDecoderParent_h_

View File

@ -12,8 +12,7 @@
#include "GMPSharedMemManager.h"
#include "GMPVideoHost.h"
namespace mozilla {
namespace gmp {
namespace mozilla::gmp {
class GMPContentChild;
@ -72,7 +71,6 @@ class GMPVideoEncoderChild : public PGMPVideoEncoderChild,
bool mPendingEncodeComplete;
};
} // namespace gmp
} // namespace mozilla
} // namespace mozilla::gmp
#endif // GMPVideoEncoderChild_h_

View File

@ -16,8 +16,7 @@
#include "GMPVideoEncoderProxy.h"
#include "GMPCrashHelperHolder.h"
namespace mozilla {
namespace gmp {
namespace mozilla::gmp {
class GMPContentParent;
@ -82,7 +81,6 @@ class GMPVideoEncoderParent : public GMPVideoEncoderProxy,
const uint32_t mPluginId;
};
} // namespace gmp
} // namespace mozilla
} // namespace mozilla::gmp
#endif // GMPVideoEncoderParent_h_

View File

@ -11,8 +11,7 @@
#include "gmp-video-frame.h"
#include "nsTArray.h"
namespace mozilla {
namespace gmp {
namespace mozilla::gmp {
class GMPSharedMemManager;
class GMPPlaneImpl;
@ -50,7 +49,6 @@ class GMPVideoHostImpl : public GMPVideoHost {
nsTArray<GMPVideoEncodedFrameImpl*> mEncodedFrames;
};
} // namespace gmp
} // namespace mozilla
} // namespace mozilla::gmp
#endif // GMPVideoHost_h_

View File

@ -9,8 +9,7 @@
#include "gmp-video-plane.h"
#include "mozilla/ipc/Shmem.h"
namespace mozilla {
namespace gmp {
namespace mozilla::gmp {
class GMPVideoHostImpl;
class GMPPlaneData;
@ -57,7 +56,6 @@ class GMPPlaneImpl : public GMPPlane {
GMPVideoHostImpl* mHost;
};
} // namespace gmp
} // namespace mozilla
} // namespace mozilla::gmp
#endif // GMPVideoPlaneImpl_h_

View File

@ -10,8 +10,7 @@
#include "mozilla/ipc/Shmem.h"
#include "GMPVideoPlaneImpl.h"
namespace mozilla {
namespace gmp {
namespace mozilla::gmp {
class GMPVideoi420FrameData;
@ -72,8 +71,6 @@ class GMPVideoi420FrameImpl : public GMPVideoi420Frame {
uint64_t mDuration;
};
} // namespace gmp
} // namespace mozilla
} // namespace mozilla::gmp
#endif // GMPVideoi420FrameImpl_h_

View File

@ -11,11 +11,9 @@
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/media/MediaUtils.h"
namespace mozilla {
namespace ipc {
namespace mozilla::ipc {
class SharedPreferenceSerializer;
}
} // namespace mozilla
} // namespace mozilla::ipc
class nsITimer;
namespace mozilla {

View File

@ -9,11 +9,9 @@
#include "RemoteDecoderManagerChild.h"
#include "RemoteDecoderParent.h"
namespace mozilla {
namespace layers {
namespace mozilla::layers {
class BufferRecycleBin;
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers
namespace mozilla {

View File

@ -9,8 +9,7 @@
#include "nsTArray.h"
#include "VideoUtils.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class IMediaController;
class MediaControlService;
@ -50,7 +49,6 @@ class AudioFocusManager {
RefPtr<SimpleTimer> mTelemetryTimer;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // DOM_MEDIA_MEDIACONTROL_AUDIOFOCUSMANAGER_H_

View File

@ -8,8 +8,7 @@
#include "MediaControlKeySource.h"
#include "MediaStatusManager.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class BrowsingContext;
@ -105,7 +104,6 @@ class ContentMediaController final : public ContentMediaAgent,
nsTArray<RefPtr<ContentMediaControlKeyReceiver>> mReceivers;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // DOM_MEDIA_MEDIACONTROL_CONTENTMEDIACONTROLLER_H_

View File

@ -9,8 +9,7 @@
#include "nsPIDOMWindow.h"
#include "mozilla/dom/BrowsingContext.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class MediaSession;
@ -68,7 +67,6 @@ class ContentMediaControlKeyHandler {
const MediaControlAction& aAction);
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif

View File

@ -10,8 +10,7 @@
#include "mozilla/dom/MediaSessionBinding.h"
#include "mozilla/MozPromise.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/**
* FetchImageHelper is used to fetch image data from MediaImage, and the fetched
* image data would be used to show on the virtual control inferface. The URL of
@ -78,7 +77,6 @@ class FetchImageHelper final {
RefPtr<ImageFetchListener> mListener;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // DOM_MEDIA_MEDIACONTROL_FETCHIMAGEHELPER_H_

View File

@ -9,8 +9,7 @@
#include "MediaEventSource.h"
#include "nsIObserver.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/**
* MediaControlKeyManager is a wrapper of MediaControlKeySource, which
@ -69,7 +68,6 @@ class MediaControlKeyManager final : public MediaControlKeySource,
nsTArray<MediaControlKey> mSupportedKeys;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif

View File

@ -12,8 +12,7 @@
#include "nsISupportsImpl.h"
#include "nsTArray.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// This is used to store seek related properties from MediaSessionActionDetails.
// However, currently we have no plan to support `seekOffset`.
@ -118,7 +117,6 @@ class MediaControlKeySource {
MediaSessionPlaybackState mPlaybackState;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif

View File

@ -14,8 +14,7 @@
#include "nsIObserver.h"
#include "nsTArray.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/**
* MediaControlService is an interface to access controllers by providing
@ -177,7 +176,6 @@ class MediaControlService final : public nsIObserver {
bool mHasEverEnabledMediaControl = false;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif

View File

@ -18,8 +18,7 @@
extern mozilla::LazyLogModule gMediaControlLog;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
inline const char* ToMediaControlKeyStr(MediaControlKey aKey) {
switch (aKey) {
@ -212,7 +211,6 @@ inline uint32_t GetMediaKeyMask(mozilla::dom::MediaControlKey aKey) {
return 1 << static_cast<uint8_t>(aKey);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // DOM_MEDIA_MEDIACONTROL_MEDIACONTROLUTILS_H_

View File

@ -17,8 +17,7 @@
#include "nsISupportsImpl.h"
#include "nsITimer.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class BrowsingContext;
@ -210,7 +209,6 @@ class MediaController final : public DOMEventTargetHelper,
nsCOMPtr<nsITimer> mDeactivationTimer;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif

View File

@ -11,8 +11,7 @@
#include "nsTArray.h"
#include "nsTHashMap.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/**
* This enum is used to update controlled media state to the media controller in
@ -135,7 +134,6 @@ class MediaPlaybackStatus final {
Maybe<uint64_t> mOwningAudioFocusContextId;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // DOM_MEDIA_MEDIACONTROL_MEDIAPLAYBACKSTATUS_H_

View File

@ -14,8 +14,7 @@
#include "nsTHashMap.h"
#include "nsISupportsImpl.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class MediaSessionInfo {
public:
@ -272,7 +271,6 @@ class MediaStatusManager : public IMediaInfoUpdater {
MediaPlaybackStatus mPlaybackStatusDelegate;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // DOM_MEDIA_MEDIACONTROL_MEDIASTATUSMANAGER_H_

View File

@ -37,8 +37,7 @@
# undef max
#endif
namespace mozilla {
namespace wmf {
namespace mozilla::wmf {
// A helper class for automatically starting and shuting down the Media
// Foundation. Prior to using Media Foundation in a process, users should call
@ -65,6 +64,7 @@ class MediaFoundationInitializer final {
}
return Get()->mHasInitialized;
}
private:
static MediaFoundationInitializer* Get() {
{
@ -74,18 +74,19 @@ class MediaFoundationInitializer final {
GetMainThreadSerialEventTarget()->Dispatch(
NS_NewRunnableFunction("MediaFoundationInitializer::Get", [&] {
// Need to run this before MTA thread gets destroyed.
RunOnShutdown([&] {
sInitializer.reset();
sIsShutdown = true;
}, ShutdownPhase::XPCOMShutdown);
RunOnShutdown(
[&] {
sInitializer.reset();
sIsShutdown = true;
},
ShutdownPhase::XPCOMShutdown);
}));
}
}
return sInitializer.get();
}
MediaFoundationInitializer()
: mHasInitialized(SUCCEEDED(MFStartup())) {
MediaFoundationInitializer() : mHasInitialized(SUCCEEDED(MFStartup())) {
if (!mHasInitialized) {
NS_WARNING("MFStartup failed");
}
@ -166,7 +167,6 @@ HRESULT MFCreatePresentationDescriptor(
HRESULT MFCreateMemoryBuffer(DWORD cbMaxLength, IMFMediaBuffer** ppBuffer);
} // end namespace wmf
} // end namespace mozilla
} // namespace mozilla::wmf
#endif

View File

@ -84,7 +84,7 @@ static bool IsRemoteAcceleratedCompositor(
return true;
}
TextureFactoryIdentifier ident =
layers::TextureFactoryIdentifier ident =
aKnowsCompositor->GetTextureFactoryIdentifier();
return !aKnowsCompositor->UsingSoftwareWebRender() &&
ident.mParentProcessType == GeckoProcessType_GPU;