Bug 877503 - Add MOZ_FINAL to some Android classes to fix gcc 4.7 warnings-as-errors. blanket-r=ehsan rs=tbsaunde
authorChris Peterson <cpeterson@mozilla.com>
Thu, 30 May 2013 11:26:02 -0700
changeset 145972 8aeb23b70d977c6d7dcd19d0d6f966873a5dc8f9
parent 145971 ddfd9529883570535df96bfbcdeb28bbaa3e8dda
child 145973 159b70e1746a35a8e8edc1d27f7075575d6abfca
push id368
push userbbajaj@mozilla.com
push dateMon, 09 Sep 2013 22:57:58 +0000
treeherdermozilla-release@5a4f47ae1217 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs877503
milestone24.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 877503 - Add MOZ_FINAL to some Android classes to fix gcc 4.7 warnings-as-errors. blanket-r=ehsan rs=tbsaunde
dom/system/android/AndroidLocationProvider.h
dom/system/android/nsHapticFeedback.h
netwerk/protocol/device/AndroidCaptureProvider.h
uriloader/exthandler/android/nsExternalSharingAppService.h
uriloader/exthandler/android/nsExternalURLHandlerService.h
uriloader/exthandler/android/nsMIMEInfoAndroid.h
widget/android/AndroidBridge.h
widget/android/AndroidJavaWrappers.cpp
widget/android/nsAppShell.cpp
widget/android/nsClipboard.h
widget/android/nsDeviceContextAndroid.h
widget/android/nsIMEPicker.h
widget/android/nsScreenManagerAndroid.h
widget/android/nsWindow.cpp
--- a/dom/system/android/AndroidLocationProvider.h
+++ b/dom/system/android/AndroidLocationProvider.h
@@ -2,17 +2,17 @@
  * 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 AndroidLocationProvider_h
 #define AndroidLocationProvider_h
 
 #include "nsIGeolocationProvider.h"
 
-class AndroidLocationProvider : public nsIGeolocationProvider
+class AndroidLocationProvider MOZ_FINAL : public nsIGeolocationProvider
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIGEOLOCATIONPROVIDER
 
     AndroidLocationProvider();
 private:
     ~AndroidLocationProvider();
--- a/dom/system/android/nsHapticFeedback.h
+++ b/dom/system/android/nsHapticFeedback.h
@@ -1,13 +1,13 @@
 /* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * 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 "nsIHapticFeedback.h"
 
-class nsHapticFeedback : public nsIHapticFeedback
+class nsHapticFeedback MOZ_FINAL : public nsIHapticFeedback
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIHAPTICFEEDBACK
 };
--- a/netwerk/protocol/device/AndroidCaptureProvider.h
+++ b/netwerk/protocol/device/AndroidCaptureProvider.h
@@ -11,28 +11,28 @@
 #include "nsCOMPtr.h"
 #include "nsAutoPtr.h"
 #include "nsString.h"
 #include "mozilla/net/CameraStreamImpl.h"
 #include "nsIEventTarget.h"
 #include "nsDeque.h"
 #include "mozilla/ReentrantMonitor.h"
 
-class AndroidCaptureProvider : public nsDeviceCaptureProvider {
+class AndroidCaptureProvider MOZ_FINAL : public nsDeviceCaptureProvider {
   public:
     AndroidCaptureProvider();
     ~AndroidCaptureProvider();
 
     NS_DECL_ISUPPORTS
 
     nsresult Init(nsACString& aContentType, nsCaptureParams* aParams, nsIInputStream** aStream);
     static AndroidCaptureProvider* sInstance;
 };
 
-class AndroidCameraInputStream : public nsIAsyncInputStream, mozilla::net::CameraStreamImpl::FrameCallback {
+class AndroidCameraInputStream MOZ_FINAL : public nsIAsyncInputStream, mozilla::net::CameraStreamImpl::FrameCallback {
   public:
     AndroidCameraInputStream();
     ~AndroidCameraInputStream();
 
     NS_IMETHODIMP Init(nsACString& aContentType, nsCaptureParams* aParams);
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIINPUTSTREAM
--- a/uriloader/exthandler/android/nsExternalSharingAppService.h
+++ b/uriloader/exthandler/android/nsExternalSharingAppService.h
@@ -6,22 +6,23 @@
 #define NS_EXTERNAL_SHARING_APP_SERVICE_H
 #include "nsIExternalSharingAppService.h"
 
 
 #define NS_EXTERNALSHARINGAPPSERVICE_CID                \
   {0x93e2c46e, 0x0011, 0x434b,                          \
     {0x81, 0x2e, 0xb6, 0xf3, 0xa8, 0x1e, 0x2a, 0x58}}
 
-class nsExternalSharingAppService : public nsIExternalSharingAppService
+class nsExternalSharingAppService MOZ_FINAL
+  : public nsIExternalSharingAppService
 {
 public:
   NS_DECL_ISUPPORTS
-    NS_DECL_NSIEXTERNALSHARINGAPPSERVICE
+  NS_DECL_NSIEXTERNALSHARINGAPPSERVICE
 
-    nsExternalSharingAppService();
+  nsExternalSharingAppService();
 
 private:
   ~nsExternalSharingAppService();
 
 };
 
 #endif /*NS_EXTERNAL_SHARING_APP_SERVICE_H */
--- a/uriloader/exthandler/android/nsExternalURLHandlerService.h
+++ b/uriloader/exthandler/android/nsExternalURLHandlerService.h
@@ -7,17 +7,18 @@
 #define NSEXTERNALURLHANDLERSERVICE_H
 
 #include "nsIExternalURLHandlerService.h"
 
 // {4BF1F8EF-D947-4BA3-9CD3-8C9A54A63A1C}
 #define NS_EXTERNALURLHANDLERSERVICE_CID \
     {0x4bf1f8ef, 0xd947, 0x4ba3, {0x9c, 0xd3, 0x8c, 0x9a, 0x54, 0xa6, 0x3a, 0x1c}}
 
-class nsExternalURLHandlerService : public nsIExternalURLHandlerService
+class nsExternalURLHandlerService MOZ_FINAL
+  : public nsIExternalURLHandlerService
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIEXTERNALURLHANDLERSERVICE
 
     nsExternalURLHandlerService();
 private:
     ~nsExternalURLHandlerService();
--- a/uriloader/exthandler/android/nsMIMEInfoAndroid.h
+++ b/uriloader/exthandler/android/nsMIMEInfoAndroid.h
@@ -4,17 +4,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsMIMEInfoAndroid_h
 #define nsMIMEInfoAndroid_h
 
 #include "nsMIMEInfoImpl.h"
 #include "nsIMutableArray.h"
 #include "nsAndroidHandlerApp.h"
-class nsMIMEInfoAndroid : public nsIMIMEInfo
+
+class nsMIMEInfoAndroid MOZ_FINAL : public nsIMIMEInfo
 {
 public:
   static bool
   GetMimeInfoForMimeType(const nsACString& aMimeType, 
                          nsMIMEInfoAndroid** aMimeInfo);
   static bool
   GetMimeInfoForFileExt(const nsACString& aFileExt, 
                         nsMIMEInfoAndroid** aMimeInfo);
@@ -35,17 +36,17 @@ protected:
   nsCOMPtr<nsIMutableArray> mHandlerApps;
   nsCString mType;
   nsTArray<nsCString> mExtensions;
   bool mAlwaysAsk;
   nsHandlerInfoAction mPrefAction;
   nsString mDescription;
   nsCOMPtr<nsIHandlerApp> mPrefApp;
   
-  class SystemChooser : public nsIHandlerApp {
+  class SystemChooser MOZ_FINAL : public nsIHandlerApp {
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIHANDLERAPP
     SystemChooser(nsMIMEInfoAndroid* aOuter): mOuter(aOuter) {};
     
   private:
     nsMIMEInfoAndroid* mOuter;
     
--- a/widget/android/AndroidBridge.h
+++ b/widget/android/AndroidBridge.h
@@ -115,17 +115,17 @@ public:
     }
 
 private:
     Task* mTask;
     TimeStamp mRunTime;
 };
 
 
-class AndroidBridge : public mozilla::layers::GeckoContentController
+class AndroidBridge MOZ_FINAL : public mozilla::layers::GeckoContentController
 {
 public:
     enum {
         // Values for NotifyIME, in addition to values from the Gecko
         // NotificationToIME enum; use negative values here to prevent conflict
         NOTIFY_IME_REPLY_EVENT = -1,
     };
 
@@ -710,17 +710,17 @@ private:
 };
 
 }
 
 #define NS_ANDROIDBRIDGE_CID \
 { 0x0FE2321D, 0xEBD9, 0x467D, \
     { 0xA7, 0x43, 0x03, 0xA6, 0x8D, 0x40, 0x59, 0x9E } }
 
-class nsAndroidBridge : public nsIAndroidBridge
+class nsAndroidBridge MOZ_FINAL : public nsIAndroidBridge
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIANDROIDBRIDGE
 
   nsAndroidBridge();
 
 private:
--- a/widget/android/AndroidJavaWrappers.cpp
+++ b/widget/android/AndroidJavaWrappers.cpp
@@ -1020,17 +1020,17 @@ jobject ConvertToJavaViewportMetrics(JNI
     jobject jobj = env->NewObject(AndroidGeckoLayerClient::jViewportClass, AndroidGeckoLayerClient::jViewportCtor,
                                   pageLeft, pageTop, pageRight, pageBottom,
                                   cssPageLeft, cssPageTop, cssPageRight, cssPageBottom,
                                   x, y, x + width, y + height,
                                   zoom);
     return jobj;
 }
 
-class nsAndroidDisplayport : public nsIAndroidDisplayport
+class nsAndroidDisplayport MOZ_FINAL : public nsIAndroidDisplayport
 {
 public:
     NS_DECL_ISUPPORTS
     virtual nsresult GetLeft(float *aLeft) { *aLeft = mLeft; return NS_OK; }
     virtual nsresult GetTop(float *aTop) { *aTop = mTop; return NS_OK; }
     virtual nsresult GetRight(float *aRight) { *aRight = mRight; return NS_OK; }
     virtual nsresult GetBottom(float *aBottom) { *aBottom = mBottom; return NS_OK; }
     virtual nsresult GetResolution(float *aResolution) { *aResolution = mResolution; return NS_OK; }
--- a/widget/android/nsAppShell.cpp
+++ b/widget/android/nsAppShell.cpp
@@ -99,17 +99,17 @@ public:
     }
 private:
     nsCOMPtr<nsIAndroidBrowserApp> mBrowserApp;
     nsTArray<nsIntPoint> mPoints;
     int mTabId;
     nsRefPtr<RefCountedJavaObject> mBuffer;
 };
 
-class WakeLockListener : public nsIDOMMozWakeLockListener {
+class WakeLockListener MOZ_FINAL : public nsIDOMMozWakeLockListener {
  public:
   NS_DECL_ISUPPORTS;
 
   nsresult Callback(const nsAString& topic, const nsAString& state) {
     AndroidBridge::Bridge()->NotifyWakeLockChanged(topic, state);
     return NS_OK;
   }
 };
--- a/widget/android/nsClipboard.h
+++ b/widget/android/nsClipboard.h
@@ -3,17 +3,17 @@
  * 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 NS_CLIPBOARD_H
 #define NS_CLIPBOARD_H
 
 #include "nsIClipboard.h"
 
-class nsClipboard : public nsIClipboard
+class nsClipboard MOZ_FINAL : public nsIClipboard
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICLIPBOARD
 
   nsClipboard();
 };
 
--- a/widget/android/nsDeviceContextAndroid.h
+++ b/widget/android/nsDeviceContextAndroid.h
@@ -1,20 +1,20 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsIDeviceContextSpec.h"
 #include "nsCOMPtr.h"
 
-class nsDeviceContextSpecAndroid : public nsIDeviceContextSpec
+class nsDeviceContextSpecAndroid MOZ_FINAL : public nsIDeviceContextSpec
 {
 public:
     NS_DECL_ISUPPORTS
-    
+
     NS_IMETHOD GetSurfaceForPrinter(gfxASurface** surface);
 
     NS_IMETHOD Init(nsIWidget* aWidget,
                     nsIPrintSettings* aPS,
                     bool aIsPrintPreview);
     NS_IMETHOD BeginDocument(PRUnichar* aTitle,
                              PRUnichar* aPrintToFileName,
                              int32_t aStartPage,
--- a/widget/android/nsIMEPicker.h
+++ b/widget/android/nsIMEPicker.h
@@ -2,24 +2,21 @@
  * 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 __nsIMEPicker
 #define __nsIMEPicker
 
 #include "nsIIMEPicker.h"
 
-class nsIMEPicker : public nsIIMEPicker
+class nsIMEPicker MOZ_FINAL : public nsIIMEPicker
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIIMEPICKER
 
   nsIMEPicker();
 
 private:
   ~nsIMEPicker();
-
-protected:
-
 };
 
 #endif
--- a/widget/android/nsScreenManagerAndroid.h
+++ b/widget/android/nsScreenManagerAndroid.h
@@ -7,33 +7,32 @@
 #define nsScreenManagerAndroid_h___
 
 #include "nsCOMPtr.h"
 
 #include "nsBaseScreen.h"
 #include "nsIScreenManager.h"
 #include "WidgetUtils.h"
 
-class nsScreenAndroid : public nsBaseScreen
+class nsScreenAndroid MOZ_FINAL : public nsBaseScreen
 {
 public:
     nsScreenAndroid(void *nativeScreen);
     ~nsScreenAndroid();
 
     NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
     NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
     NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth);
     NS_IMETHOD GetColorDepth(int32_t* aColorDepth);
 
 protected:
     virtual void ApplyMinimumBrightness(uint32_t aBrightness) MOZ_OVERRIDE;
 };
 
-class nsScreenManagerAndroid :
-    public nsIScreenManager
+class nsScreenManagerAndroid MOZ_FINAL : public nsIScreenManager
 {
 public:
     nsScreenManagerAndroid();
     ~nsScreenManagerAndroid();
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSISCREENMANAGER
 
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -66,22 +66,22 @@ static gfxIntSize gAndroidScreenBounds;
 
 #include "mozilla/layers/AsyncPanZoomController.h"
 #include "mozilla/layers/CompositorChild.h"
 #include "mozilla/layers/CompositorParent.h"
 #include "mozilla/layers/LayerTransactionParent.h"
 #include "mozilla/Mutex.h"
 #include "nsThreadUtils.h"
 
-
 class ContentCreationNotifier;
 static nsCOMPtr<ContentCreationNotifier> gContentCreationNotifier;
+
 // A helper class to send updates when content processes
 // are created. Currently an update for the screen size is sent.
-class ContentCreationNotifier : public nsIObserver
+class ContentCreationNotifier MOZ_FINAL : public nsIObserver
 {
     NS_DECL_ISUPPORTS
 
     NS_IMETHOD Observe(nsISupports* aSubject,
                        const char* aTopic,
                        const PRUnichar* aData)
     {
         if (!strcmp(aTopic, "ipc:content-created")) {