Bug 1255707 - Part 2. Remove ScreenSizeChanged. r?snorp draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 14 Mar 2016 17:53:21 +0900
changeset 339891 116f3c3522ca4fdda410bc654cdb3c3a79128e16
parent 339890 a5ac6f86d2a11caaae47292a9c37a96903ab0570
child 516067 f7e0753083af9fc761c67e36970d066c9b32db7e
push id12819
push userm_kato@ga2.so-net.ne.jp
push dateMon, 14 Mar 2016 09:08:05 +0000
reviewerssnorp
bugs1255707, 600880
milestone48.0a1
Bug 1255707 - Part 2. Remove ScreenSizeChanged. r?snorp SceenSizeChanged IPC was for bug 600880. No one uses it. MozReview-Commit-ID: KsQXtP1aMAP
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/PContent.ipdl
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -593,19 +593,16 @@ static void
 ReinitTaskTracer(void* /*aUnused*/)
 {
   mozilla::tasktracer::InitTaskTracer(mozilla::tasktracer::FORKED_AFTER_NUWA);
 }
 #endif
 
 ContentChild::ContentChild()
  : mID(uint64_t(-1))
-#ifdef ANDROID
- , mScreenSize(0, 0)
-#endif
  , mCanOverrideProcessName(true)
  , mIsAlive(true)
 {
   // This process is a content process, so it's clearly running in
   // multiprocess mode!
   nsDebugImpl::SetMultiprocessMode("Child");
 }
 
@@ -2508,27 +2505,16 @@ ContentChild::RecvAddPermission(const IP
                                  nsPermissionManager::eNotify,
                                  nsPermissionManager::eNoDBOperation);
 #endif
 
   return true;
 }
 
 bool
-ContentChild::RecvScreenSizeChanged(const gfx::IntSize& size)
-{
-#ifdef ANDROID
-  mScreenSize = size;
-#else
-  NS_RUNTIMEABORT("Message currently only expected on android");
-#endif
-  return true;
-}
-
-bool
 ContentChild::RecvFlushMemory(const nsString& reason)
 {
 #ifdef MOZ_NUWA_PROCESS
   MOZ_ASSERT(!IsNuwaProcess() || !IsNuwaReady());
 #endif
   nsCOMPtr<nsIObserverService> os =
     mozilla::services::GetObserverService();
   if (os) {
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -436,18 +436,16 @@ public:
   virtual bool RecvGeolocationUpdate(const GeoPosition& somewhere) override;
 
   virtual bool RecvGeolocationError(const uint16_t& errorCode) override;
 
   virtual bool RecvUpdateDictionaryList(InfallibleTArray<nsString>&& aDictionaries) override;
 
   virtual bool RecvAddPermission(const IPC::Permission& permission) override;
 
-  virtual bool RecvScreenSizeChanged(const gfx::IntSize &size) override;
-
   virtual bool RecvFlushMemory(const nsString& reason) override;
 
   virtual bool RecvActivateA11y() override;
 
   virtual bool RecvGarbageCollect() override;
   virtual bool RecvCycleCollect() override;
 
   virtual bool RecvAppInfo(const nsCString& version, const nsCString& buildID,
@@ -539,20 +537,16 @@ public:
   RecvPushWithData(const nsCString& aScope,
                    const IPC::Principal& aPrincipal,
                    InfallibleTArray<uint8_t>&& aData) override;
 
   virtual bool
   RecvPushSubscriptionChange(const nsCString& aScope,
                              const IPC::Principal& aPrincipal) override;
 
-#ifdef ANDROID
-  gfx::IntSize GetScreenSize() { return mScreenSize; }
-#endif
-
   // Get the directory for IndexedDB files. We query the parent for this and
   // cache the value
   nsString &GetIndexedDBPath();
 
   ContentParentId GetID() const { return mID; }
 
   bool IsForApp() const { return mIsForApp; }
   bool IsForBrowser() const { return mIsForBrowser; }
@@ -634,20 +628,16 @@ private:
    *
    * We expect our content parent to set this ID immediately after opening a
    * channel to us.
    */
   ContentParentId mID;
 
   AppInfo mAppInfo;
 
-#ifdef ANDROID
-  gfx::IntSize mScreenSize;
-#endif
-
   bool mIsForApp;
   bool mIsForBrowser;
   bool mCanOverrideProcessName;
   bool mIsAlive;
   nsString mProcessName;
 
   static ContentChild* sSingleton;
 
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -603,18 +603,16 @@ child:
 
     async GeolocationError(uint16_t errorCode);
 
     async UpdateDictionaryList(nsString[] dictionaries);
 
     // nsIPermissionManager messages
     async AddPermission(Permission permission);
 
-    async ScreenSizeChanged(IntSize size);
-
     async Volumes(VolumeInfo[] volumes);
 
     async FlushMemory(nsString reason);
 
     async GarbageCollect();
     async CycleCollect();
 
     /**