Bug 1194897 - Copy parent window chromeFlags when instantiating a new TabParent in the parent process. r=smaug

The parent window chromeFlags contain information that the content process
needs - for example, whether or not the location bar, menubar, status bar,
and personal toolbar are set to be visible.

--HG--
extra : commitid : HmbAVQ6UYfw
extra : rebase_source : d2ca8203155110245de7b44d05b59bbdcc343cbd
This commit is contained in:
Mike Conley 2015-09-21 17:14:25 -04:00
Родитель 54a8708a3a
Коммит b1cc90cb12
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -114,6 +114,7 @@
#include "nsIClipboard.h"
#include "nsContentPermissionHelper.h"
#include "nsICycleCollectorListener.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIDocument.h"
#include "nsIDOMGeoGeolocation.h"
#include "nsIDOMGeoPositionError.h"
@ -124,6 +125,7 @@
#include "nsIFormProcessor.h"
#include "nsIGfxInfo.h"
#include "nsIIdleService.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIMemoryInfoDumper.h"
#include "nsIMemoryReporter.h"
#include "nsIMozBrowserFrame.h"
@ -1234,7 +1236,18 @@ ContentParent::CreateBrowserOrApp(const TabContext& aContext,
constructorSender->ChildID());
}
if (constructorSender) {
nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
docShell->GetTreeOwner(getter_AddRefs(treeOwner));
if (!treeOwner) {
return nullptr;
}
nsCOMPtr<nsIWebBrowserChrome> wbc = do_GetInterface(treeOwner);
if (!wbc) {
return nullptr;
}
uint32_t chromeFlags = 0;
wbc->GetChromeFlags(&chromeFlags);
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(docShell);
if (loadContext && loadContext->UsePrivateBrowsing()) {