Bug 816614: Restore the previous behavior of ContentChild::IsForApp/Browser(). r=jlebar
authorChris Jones <jones.chris.g@gmail.com>
Fri, 11 Jan 2013 12:19:02 +0100
changeset 118557 4c0d5853f72b101d1519b90a888b2223d5c9556d
parent 118556 cceb83b998de59193ca289e55a6d9ae2e2eb17e5
child 118558 56e67e5e15482441def450399e40808ecb237ed4
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjlebar
bugs816614
milestone21.0a1
Bug 816614: Restore the previous behavior of ContentChild::IsForApp/Browser(). r=jlebar
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
gfx/thebes/gfxAndroidPlatform.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -224,18 +224,17 @@ ConsoleListener::Observe(nsIConsoleMessa
     NS_ENSURE_SUCCESS(rv, rv);
     mChild->SendConsoleMessage(msg);
     return NS_OK;
 }
 
 ContentChild* ContentChild::sSingleton;
 
 ContentChild::ContentChild()
- : TabContext()
- , mID(uint64_t(-1))
+ : mID(uint64_t(-1))
 #ifdef ANDROID
    ,mScreenSize(0, 0)
 #endif
 {
     // This process is a content process, so it's clearly running in
     // multiprocess mode!
     nsDebugImpl::SetMultiprocessMode("Child");
 }
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -37,17 +37,16 @@ namespace dom {
 
 class AlertObserver;
 class PrefObserver;
 class ConsoleListener;
 class PStorageChild;
 class ClonedMessageData;
 
 class ContentChild : public PContentChild
-                   , public TabContext
 {
     typedef mozilla::dom::ClonedMessageData ClonedMessageData;
     typedef mozilla::ipc::OptionalURIParams OptionalURIParams;
     typedef mozilla::ipc::URIParams URIParams;
 
 public:
     ContentChild();
     virtual ~ContentChild();
@@ -194,16 +193,19 @@ public:
 #endif
 
     // Get the directory for IndexedDB files. We query the parent for this and
     // cache the value
     nsString &GetIndexedDBPath();
 
     uint64_t GetID() { return mID; }
 
+    bool IsForApp() { return mIsForApp; }
+    bool IsForBrowser() { return mIsForBrowser; }
+
     bool GetParamsForBlob(nsDOMFileBase* aBlob,
                           BlobConstructorParams* aOutParams);
     BlobChild* GetOrCreateActorForBlob(nsIDOMBlob* aBlob);
 
 private:
     virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
 
     virtual void ProcessingError(Result what) MOZ_OVERRIDE;
--- a/gfx/thebes/gfxAndroidPlatform.cpp
+++ b/gfx/thebes/gfxAndroidPlatform.cpp
@@ -254,17 +254,17 @@ gfxAndroidPlatform::FontHintingEnabled()
     // 
     // XXX when gecko-android-java is used as an "app runtime", we'll
     // want to re-enable hinting.
     return false;
 #else
     // Otherwise, enable hinting unless we're in a content process
     // that might be used for non-reflowing zoom.
     return XRE_GetProcessType() != GeckoProcessType_Content ||
-           ContentChild::GetSingleton()->HasOwnApp();
+           !ContentChild::GetSingleton()->IsForBrowser();
 #endif //  MOZ_USING_ANDROID_JAVA_WIDGETS
 }
 
 int
 gfxAndroidPlatform::GetScreenDepth() const
 {
     return mScreenDepth;
 }