Bug 1273148: Make name and default methods public, and remove gfxWindowsPlatform as gfxPref's friend. r?dvander draft
authorMilan Sreckovic <milan@mozilla.com>
Mon, 16 May 2016 10:22:20 -0400
changeset 367388 83cf0eeb4801eb95149da702c9b3243114ccaf9e
parent 367249 d0be57e84807ce0853b2406de7ff6abb195ac898
child 520997 1bdf8db3e3cf3c6967f51c07da7118366f598ed6
push id18226
push usermsreckovic@mozilla.com
push dateMon, 16 May 2016 14:22:40 +0000
reviewersdvander
bugs1273148
milestone49.0a1
Bug 1273148: Make name and default methods public, and remove gfxWindowsPlatform as gfxPref's friend. r?dvander MozReview-Commit-ID: DNqGGDl1Fpy
gfx/thebes/gfxPrefs.h
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -57,28 +57,26 @@
 // This is true even for 'Once' prefs which otherwise do not change if the
 // pref is updated after initialization.
 
 #define DECL_GFX_PREF(Update, Pref, Name, Type, Default)                     \
 public:                                                                       \
 static Type Name() { MOZ_ASSERT(SingletonExists()); return GetSingleton().mPref##Name.mValue; } \
 static void Set##Name(Type aVal) { MOZ_ASSERT(SingletonExists()); \
     GetSingleton().mPref##Name.Set(UpdatePolicy::Update, Get##Name##PrefName(), aVal); } \
-private:                                                                      \
 static const char* Get##Name##PrefName() { return Pref; }                     \
 static Type Get##Name##PrefDefault() { return Default; }                      \
+private:                                                                      \
 PrefTemplate<UpdatePolicy::Update, Type, Get##Name##PrefDefault, Get##Name##PrefName> mPref##Name
 
 class PreferenceAccessImpl;
 class gfxPrefs;
 class gfxPrefs final
 {
-  friend class gfxWindowsPlatform;
-
-private:
+  private:
   /// See Logging.h.  This lets Moz2D access preference values it owns.
   PreferenceAccessImpl* mMoz2DPrefAccess;
 
 private:
   // Enums for the update policy.
   enum class UpdatePolicy {
     Skip, // Set the value to default, skip any Preferences calls
     Once, // Evaluate the preference once, unchanged during the session