Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed build with latest upstream
  • Loading branch information
tmeshkova committed Jan 24, 2015
1 parent 133124e commit 9a78e2e
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 31 deletions.
Expand Up @@ -332,7 +332,7 @@ EmbedLiteAppProcessParent::AllocPCompositorParent(Transport* aTransport,
}

bool
EmbedLiteAppProcessParent::RecvPrefsArrayInitialized(const nsTArray<mozilla::dom::PrefSetting>& prefs)
EmbedLiteAppProcessParent::RecvPrefsArrayInitialized(nsTArray<mozilla::dom::PrefSetting>&& prefs)
{
LOGT();
mPrefs = prefs;
Expand Down
Expand Up @@ -66,7 +66,7 @@ class EmbedLiteAppProcessParent : public PEmbedLiteAppParent
AllocPCompositorParent(Transport* aTransport, ProcessId aOtherProcess);

virtual bool
RecvPrefsArrayInitialized(const nsTArray<mozilla::dom::PrefSetting>& prefs);
RecvPrefsArrayInitialized(nsTArray<mozilla::dom::PrefSetting>&& prefs);

private:
virtual ~EmbedLiteAppProcessParent();
Expand Down
20 changes: 16 additions & 4 deletions embedding/embedlite/embedprocess/EmbedLiteContentProcess.cpp
Expand Up @@ -7,12 +7,24 @@
#include "mozilla/ipc/IOThreadChild.h"

#include "EmbedLiteContentProcess.h"
#include "EmbedLiteAppProcessChild.h"

using mozilla::ipc::IOThreadChild;

namespace mozilla {
namespace embedlite {

EmbedLiteContentProcess::EmbedLiteContentProcess(ProcessHandle mParentHandle)
: ProcessChild(mParentHandle)
{
mContent = new EmbedLiteAppProcessChild();
}

EmbedLiteContentProcess::~EmbedLiteContentProcess()
{
delete mContent;
}

void
EmbedLiteContentProcess::SetAppDir(const nsACString& aPath)
{
Expand All @@ -23,12 +35,12 @@ bool
EmbedLiteContentProcess::Init()
{
LOGT();
mContent.Init(IOThreadChild::message_loop(),
ParentHandle(),
IOThreadChild::channel());
mContent->Init(IOThreadChild::message_loop(),
ParentHandle(),
IOThreadChild::channel());

mXREEmbed.Start();
mContent.InitXPCOM();
mContent->InitXPCOM();

return true;
}
Expand Down
14 changes: 6 additions & 8 deletions embedding/embedlite/embedprocess/EmbedLiteContentProcess.h
Expand Up @@ -8,14 +8,16 @@

#include "mozilla/ipc/ProcessChild.h"
#include "mozilla/ipc/ScopedXREEmbed.h"
#include "EmbedLiteAppProcessChild.h"
//#include "EmbedLiteAppProcessChild.h"

#undef _MOZ_LOG
#define _MOZ_LOG(s) printf("[ContentProcess] %s", s)

namespace mozilla {
namespace embedlite {

class EmbedLiteAppProcessChild;

/**
* EmbedLiteContentProcess is a singleton on the content process which represents
* the main thread where tab instances live.
Expand All @@ -25,20 +27,16 @@ class EmbedLiteContentProcess : public mozilla::ipc::ProcessChild
typedef mozilla::ipc::ProcessChild ProcessChild;

public:
EmbedLiteContentProcess(ProcessHandle mParentHandle)
: ProcessChild(mParentHandle)
{ }

~EmbedLiteContentProcess()
{ }
EmbedLiteContentProcess(ProcessHandle mParentHandle);
~EmbedLiteContentProcess();

virtual bool Init();
virtual void CleanUp();

void SetAppDir(const nsACString& aPath);

private:
EmbedLiteAppProcessChild mContent;
EmbedLiteAppProcessChild* mContent;
mozilla::ipc::ScopedXREEmbed mXREEmbed;

DISALLOW_EVIL_CONSTRUCTORS(EmbedLiteContentProcess);
Expand Down
4 changes: 2 additions & 2 deletions embedding/embedlite/embedshared/EmbedLiteAppBaseChild.cpp
Expand Up @@ -323,7 +323,7 @@ EmbedLiteAppBaseChild::RecvRemoveObserver(const nsCString& topic)
}

bool
EmbedLiteAppBaseChild::RecvAddObservers(const InfallibleTArray<nsCString>& observers)
EmbedLiteAppBaseChild::RecvAddObservers(InfallibleTArray<nsCString>&& observers)
{
nsCOMPtr<nsIObserverService> observerService =
do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
Expand All @@ -340,7 +340,7 @@ EmbedLiteAppBaseChild::RecvAddObservers(const InfallibleTArray<nsCString>& obser
}

bool
EmbedLiteAppBaseChild::RecvRemoveObservers(const InfallibleTArray<nsCString>& observers)
EmbedLiteAppBaseChild::RecvRemoveObservers(InfallibleTArray<nsCString>&& observers)
{
nsCOMPtr<nsIObserverService> observerService =
do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
Expand Down
4 changes: 2 additions & 2 deletions embedding/embedlite/embedshared/EmbedLiteAppBaseChild.h
Expand Up @@ -50,8 +50,8 @@ class EmbedLiteAppBaseChild : public PEmbedLiteAppChild,
const nsString& data) MOZ_OVERRIDE;
virtual bool RecvAddObserver(const nsCString&) MOZ_OVERRIDE;
virtual bool RecvRemoveObserver(const nsCString&) MOZ_OVERRIDE;
virtual bool RecvAddObservers(const InfallibleTArray<nsCString>& observers) MOZ_OVERRIDE;
virtual bool RecvRemoveObservers(const InfallibleTArray<nsCString>& observers) MOZ_OVERRIDE;
virtual bool RecvAddObservers(InfallibleTArray<nsCString>&& observers) MOZ_OVERRIDE;
virtual bool RecvRemoveObservers(InfallibleTArray<nsCString>&& observers) MOZ_OVERRIDE;
virtual bool DeallocPEmbedLiteViewChild(PEmbedLiteViewChild*) MOZ_OVERRIDE;

protected:
Expand Down
4 changes: 2 additions & 2 deletions embedding/embedlite/embedshared/EmbedLiteViewBaseChild.cpp
Expand Up @@ -593,7 +593,7 @@ EmbedLiteViewBaseChild::RecvRemoveMessageListener(const nsCString& name)
}

bool
EmbedLiteViewBaseChild::RecvAddMessageListeners(const InfallibleTArray<nsString>& messageNames)
EmbedLiteViewBaseChild::RecvAddMessageListeners(InfallibleTArray<nsString>&& messageNames)
{
for (unsigned int i = 0; i < messageNames.Length(); i++) {
mRegisteredMessages.Put(messageNames[i], 1);
Expand All @@ -602,7 +602,7 @@ EmbedLiteViewBaseChild::RecvAddMessageListeners(const InfallibleTArray<nsString>
}

bool
EmbedLiteViewBaseChild::RecvRemoveMessageListeners(const InfallibleTArray<nsString>& messageNames)
EmbedLiteViewBaseChild::RecvRemoveMessageListeners(InfallibleTArray<nsString>&& messageNames)
{
for (unsigned int i = 0; i < messageNames.Length(); i++) {
mRegisteredMessages.Remove(messageNames[i]);
Expand Down
4 changes: 2 additions & 2 deletions embedding/embedlite/embedshared/EmbedLiteViewBaseChild.h
Expand Up @@ -149,8 +149,8 @@ class EmbedLiteViewBaseChild : public PEmbedLiteViewChild,
virtual bool RecvRemoveMessageListener(const nsCString&) MOZ_OVERRIDE;
virtual void RecvAsyncMessage(const nsAString& aMessage, const nsAString& aData) MOZ_OVERRIDE;
virtual bool RecvSetGLViewSize(const gfxSize&) MOZ_OVERRIDE;
virtual bool RecvAddMessageListeners(const InfallibleTArray<nsString>& messageNames) MOZ_OVERRIDE;
virtual bool RecvRemoveMessageListeners(const InfallibleTArray<nsString>& messageNames) MOZ_OVERRIDE;
virtual bool RecvAddMessageListeners(InfallibleTArray<nsString>&& messageNames) MOZ_OVERRIDE;
virtual bool RecvRemoveMessageListeners(InfallibleTArray<nsString>&& messageNames) MOZ_OVERRIDE;
virtual void OnGeckoWindowInitialized() {}

private:
Expand Down
Expand Up @@ -116,7 +116,7 @@ EmbedLiteAppThreadParent::AllocPCompositorParent(Transport* aTransport,
}

bool
EmbedLiteAppThreadParent::RecvPrefsArrayInitialized(const nsTArray<PrefSetting>& prefs)
EmbedLiteAppThreadParent::RecvPrefsArrayInitialized(nsTArray<PrefSetting>&& prefs)
{
LOGT();
return false;
Expand Down
4 changes: 2 additions & 2 deletions embedding/embedlite/embedthread/EmbedLiteAppThreadParent.h
Expand Up @@ -47,10 +47,10 @@ class EmbedLiteAppThreadParent : public PEmbedLiteAppParent
bool* cancel) MOZ_OVERRIDE;

virtual PCompositorParent*
AllocPCompositorParent(Transport* aTransport, ProcessId aOtherProcess);
AllocPCompositorParent(Transport* aTransport, ProcessId aOtherProcess) MOZ_OVERRIDE;

virtual bool
RecvPrefsArrayInitialized(const nsTArray<PrefSetting>& prefs);
RecvPrefsArrayInitialized(nsTArray<mozilla::dom::PrefSetting>&& prefs) MOZ_OVERRIDE;

private:
virtual ~EmbedLiteAppThreadParent();
Expand Down
6 changes: 3 additions & 3 deletions embedding/embedlite/utils/TabChildHelper.cpp
Expand Up @@ -248,8 +248,8 @@ TabChildHelper::Observe(nsISupports* aSubject,
if (HasValidInnerSize()) {
InitializeRootMetrics();

utils->SetResolution(mLastRootMetrics.mPresShellResolution,
mLastRootMetrics.mPresShellResolution);
utils->SetResolution(mLastRootMetrics.GetPresShellResolution(),
mLastRootMetrics.GetPresShellResolution());
HandlePossibleViewportChange(mInnerSize);
// Relay frame metrics to subscribed listeners
mView->RelayFrameMetrics(mLastRootMetrics);
Expand Down Expand Up @@ -292,7 +292,7 @@ TabChildHelper::RecvUpdateFrame(const FrameMetrics& aFrameMetrics)
}

nsIWebNavigation*
TabChildHelper::WebNavigation()
TabChildHelper::WebNavigation() const
{
return mView->WebNavigation();
}
Expand Down
2 changes: 1 addition & 1 deletion embedding/embedlite/utils/TabChildHelper.h
Expand Up @@ -39,7 +39,7 @@ class TabChildHelper : public mozilla::dom::TabChildBase,

bool RecvUpdateFrame(const mozilla::layers::FrameMetrics& aFrameMetrics);

virtual nsIWebNavigation* WebNavigation() MOZ_OVERRIDE;
virtual nsIWebNavigation* WebNavigation() const MOZ_OVERRIDE;
virtual nsIWidget* WebWidget() MOZ_OVERRIDE;

virtual bool DoLoadFrameScript(const nsAString& aURL, bool aRunInGlobalScope) MOZ_OVERRIDE;
Expand Down
Expand Up @@ -279,7 +279,7 @@ WebrtcGmpVideoEncoder::Encode_g(const webrtc::I420VideoFrame* aInputImage,
if (err != GMPNoErr) {
return WEBRTC_VIDEO_CODEC_ERROR;
}
GMPUniquePtr<GMPVideoi420Frame> frame(static_cast<GMPVideoi420Frame*>(ftmp));
UniquePtr<GMPVideoi420Frame> frame(static_cast<GMPVideoi420Frame*>(ftmp));

err = frame->CreateFrame(aInputImage->allocated_size(webrtc::kYPlane),
aInputImage->buffer(webrtc::kYPlane),
Expand Down Expand Up @@ -635,7 +635,7 @@ WebrtcGmpVideoDecoder::Decode_g(const webrtc::EncodedImage& aInputImage,
return WEBRTC_VIDEO_CODEC_ERROR;
}

GMPUniquePtr<GMPVideoEncodedFrame> frame(static_cast<GMPVideoEncodedFrame*>(ftmp));
UniquePtr<GMPVideoEncodedFrame> frame(static_cast<GMPVideoEncodedFrame*>(ftmp));
err = frame->CreateEmptyFrame(aInputImage._length);
if (err != GMPNoErr) {
return WEBRTC_VIDEO_CODEC_ERROR;
Expand Down

0 comments on commit 9a78e2e

Please sign in to comment.