Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
145 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
embedding/embedlite/embedthread/EmbedLiteAppThreadChild.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "EmbedLog.h" | ||
#include "EmbedLiteAppThreadChild.h" | ||
|
||
namespace mozilla { | ||
namespace embedlite { | ||
|
||
static EmbedLiteAppThreadChild* sAppThreadChild = nullptr; | ||
|
||
EmbedLiteAppThreadChild* | ||
EmbedLiteAppThreadChild::GetInstance() | ||
{ | ||
return sAppThreadChild; | ||
} | ||
|
||
EmbedLiteAppThreadChild::EmbedLiteAppThreadChild(MessageLoop* aParentLoop) | ||
: EmbedLiteAppBaseChild(aParentLoop) | ||
{ | ||
LOGT(); | ||
sAppThreadChild = this; | ||
} | ||
|
||
EmbedLiteAppThreadChild::~EmbedLiteAppThreadChild() | ||
{ | ||
LOGT(); | ||
sAppThreadChild = nullptr; | ||
} | ||
|
||
PEmbedLiteViewChild* | ||
EmbedLiteAppThreadChild::AllocPEmbedLiteViewChild(const uint32_t& id, const uint32_t& parentId, const bool& isPrivateWindow) | ||
{ | ||
LOGT("id:%u, parentId:%u", id, parentId); | ||
EmbedLiteViewThreadChild* view = new EmbedLiteViewThreadChild(id, parentId, isPrivateWindow); | ||
mWeakViewMap[id] = view; | ||
view->AddRef(); | ||
return view; | ||
} | ||
|
||
} // namespace embedlite | ||
} // namespace mozilla | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef MOZ_APP_EMBED_THREAD_CHILD_H | ||
#define MOZ_APP_EMBED_THREAD_CHILD_H | ||
|
||
#include "EmbedLiteAppBaseChild.h" | ||
|
||
namespace mozilla { | ||
namespace embedlite { | ||
|
||
class EmbedLiteAppThreadChild : public EmbedLiteAppBaseChild | ||
{ | ||
public: | ||
EmbedLiteAppThreadChild(MessageLoop* aParentLoop); | ||
static EmbedLiteAppThreadChild* GetInstance(); | ||
|
||
protected: | ||
virtual ~EmbedLiteAppThreadChild(); | ||
|
||
virtual PEmbedLiteViewChild* AllocPEmbedLiteViewChild(const uint32_t&, const uint32_t& parentId, const bool& isPrivateWindow) MOZ_OVERRIDE; | ||
|
||
private: | ||
DISALLOW_EVIL_CONSTRUCTORS(EmbedLiteAppThreadChild); | ||
}; | ||
|
||
} // namespace embedlite | ||
} // namespace mozilla | ||
|
||
#endif // MOZ_APP_EMBED_THREAD_CHILD_H |
Oops, something went wrong.