Bug 1340760: P1. Fix style and headers. r?gerald draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 20 Feb 2017 18:30:42 +0100
changeset 487603 9e3d6c1d7909dd61cd8cfea53492972c5d6d6a3a
parent 487602 e4a047a0e26c74a08fcb593dda5c88851fdb3e26
child 487604 37dadcd6795eba1e4ebfb2b0ab99f3de165c5c3a
push id46263
push userbmo:jyavenard@mozilla.com
push dateTue, 21 Feb 2017 21:09:07 +0000
reviewersgerald
bugs1340760
milestone54.0a1
Bug 1340760: P1. Fix style and headers. r?gerald MozReview-Commit-ID: L24Q7fX06Z0
dom/media/gmp/GMPCrashHelper.h
dom/media/platforms/PlatformDecoderModule.h
--- a/dom/media/gmp/GMPCrashHelper.h
+++ b/dom/media/gmp/GMPCrashHelper.h
@@ -2,18 +2,19 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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/. */
 
 #if !defined(GMPCrashHelper_h_)
 #define GMPCrashHelper_h_
 
+#include "MainThreadUtils.h"
+#include "nsISupportsImpl.h"
 #include "nsPIDOMWindow.h"
-#include "nsISupportsImpl.h"
 
 namespace mozilla {
 
 // For every GMP actor requested, the caller can specify a crash helper,
 // which is an object which supplies the nsPIDOMWindowInner to which we'll
 // dispatch the PluginCrashed event if the GMP crashes.
 // GMPCrashHelper has threadsafe refcounting. Its release method ensures
 // that instances are destroyed on the main thread.
--- a/dom/media/platforms/PlatformDecoderModule.h
+++ b/dom/media/platforms/PlatformDecoderModule.h
@@ -2,26 +2,26 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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/. */
 
 #if !defined(PlatformDecoderModule_h_)
 #define PlatformDecoderModule_h_
 
+#include "GMPCrashHelper.h"
 #include "MediaDecoderReader.h"
 #include "MediaInfo.h"
+#include "MediaResult.h"
 #include "mozilla/MozPromise.h"
+#include "mozilla/RefPtr.h"
+#include "mozilla/layers/KnowsCompositor.h"
 #include "mozilla/layers/LayersTypes.h"
-#include "mozilla/layers/KnowsCompositor.h"
 #include "nsTArray.h"
-#include "mozilla/RefPtr.h"
-#include "GMPCrashHelper.h"
 #include <queue>
-#include "MediaResult.h"
 
 namespace mozilla {
 class TrackInfo;
 class AudioInfo;
 class VideoInfo;
 class MediaRawData;
 class DecoderDoctorDiagnostics;
 
@@ -36,20 +36,17 @@ class RemoteDecoderModule;
 class MediaDataDecoder;
 class TaskQueue;
 class CDMProxy;
 
 static LazyLogModule sPDMLog("PlatformDecoderModule");
 
 struct MOZ_STACK_CLASS CreateDecoderParams final
 {
-  explicit CreateDecoderParams(const TrackInfo& aConfig)
-    : mConfig(aConfig)
-  {
-  }
+  explicit CreateDecoderParams(const TrackInfo& aConfig) : mConfig(aConfig) { }
 
   template <typename T1, typename... Ts>
   CreateDecoderParams(const TrackInfo& aConfig, T1&& a1, Ts&&... args)
     : mConfig(aConfig)
   {
     Set(mozilla::Forward<T1>(a1), mozilla::Forward<Ts>(args)...);
   }
 
@@ -133,24 +130,25 @@ private:
 
 class PlatformDecoderModule
 {
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PlatformDecoderModule)
 
   // Perform any per-instance initialization.
   // This is called on the decode task queue.
-  virtual nsresult Startup() { return NS_OK; };
+  virtual nsresult Startup() { return NS_OK; }
 
   // Indicates if the PlatformDecoderModule supports decoding of aMimeType.
-  virtual bool SupportsMimeType(
-    const nsACString& aMimeType,
-    DecoderDoctorDiagnostics* aDiagnostics) const = 0;
-  virtual bool Supports(const TrackInfo& aTrackInfo,
-                        DecoderDoctorDiagnostics* aDiagnostics) const
+  virtual bool
+  SupportsMimeType(const nsACString& aMimeType,
+                   DecoderDoctorDiagnostics* aDiagnostics) const = 0;
+  virtual bool
+  Supports(const TrackInfo& aTrackInfo,
+           DecoderDoctorDiagnostics* aDiagnostics) const
   {
     // By default, fall back to SupportsMimeType with just the MIME string.
     // (So PDMs do not need to override this method -- yet.)
     return SupportsMimeType(aTrackInfo.mMimeType, aDiagnostics);
   }
 
 protected:
   PlatformDecoderModule() { }
@@ -202,17 +200,17 @@ protected:
 //
 // Decoding is done asynchronously. Any async work can be done on the
 // TaskQueue passed into the PlatformDecoderModules's Create*Decoder()
 // function. This may not be necessary for platforms with async APIs
 // for decoding.
 class MediaDataDecoder
 {
 protected:
-  virtual ~MediaDataDecoder() {};
+  virtual ~MediaDataDecoder() { }
 
 public:
   typedef TrackInfo::TrackType TrackType;
   typedef nsTArray<RefPtr<MediaData>> DecodedData;
   typedef MozPromise<TrackType, MediaResult, /* IsExclusive = */ true>
     InitPromise;
   typedef MozPromise<DecodedData, MediaResult, /* IsExclusive = */ true>
     DecodePromise;
@@ -276,17 +274,17 @@ public:
   virtual const char* GetDescriptionName() const = 0;
 
   // Set a hint of seek target time to decoder. Decoder will drop any decoded
   // data which pts is smaller than this value. This threshold needs to be clear
   // after reset decoder.
   // Decoder may not honor this value. However, it'd be better that
   // video decoder implements this API to improve seek performance.
   // Note: it should be called before Input() or after Flush().
-  virtual void SetSeekThreshold(const media::TimeUnit& aTime) {}
+  virtual void SetSeekThreshold(const media::TimeUnit& aTime) { }
 
   // When playing adaptive playback, recreating an Android video decoder will
   // cause the transition not smooth during resolution change.
   // Reuse the decoder if the decoder support recycling.
   // Currently, only Android video decoder will return true.
   virtual bool SupportDecoderRecycling() const { return false; }
 
   // ConfigurationChanged will be called to inform the video or audio decoder