GMPContentParent::~GMPContentParent() { GMP_LOG( "GMPContentParent::~GMPContentParent(this=%p) mVideoDecoders.IsEmpty=%s, " "mVideoEncoders.IsEmpty=%s, mChromiumCDMs.IsEmpty=%s, " "mCloseBlockerCount=%" PRIu32, this, GetBoolString(mVideoDecoders.IsEmpty()), GetBoolString(mVideoEncoders.IsEmpty()), GetBoolString(mChromiumCDMs.IsEmpty()), mCloseBlockerCount); }
std::wstring ButtonManage::FillString(CSUIButton* cbtn) { std::wstring buttoninformation; std::wstring btname,bmp,agn1,rc1,bnbutton,id,bhd1,wdt; std::wstring agn2,pbtname,rc2; BOOL bfirstaddalign = FALSE; btname = cbtn->m_buttonname + L":"; bmp = L"BMP," + cbtn->m_szBmpName + L";"; agn1 = L"FIXALIGN," + GetAlignString(cbtn->m_iAlign, m_property_map) + L";"; rc1 = L"FIXCRECT," + RectToString(cbtn->m_marginTownd) + L";"; bnbutton = L"NOTBUTTON," + GetBoolString(cbtn->m_NotButton) + L";"; id = L"ID," + GetIdString(cbtn->m_htMsgID) + L";"; bhd1 = L"HIDE," + GetBoolString(cbtn->m_hide) + L";"; wdt = L"HIDEWIDTH," + GetWidth(cbtn->m_hidewidth) + L";"; buttoninformation = btname + bmp + agn1 + rc1 + bnbutton + id + bhd1 + wdt; POSITION pos = cbtn->btnAlignList.GetHeadPosition(); if (pos) { CBtnAlign* cbtnalign = cbtn->btnAlignList.GetNext(pos); agn2 = L"RELATIVEALIGN," + GetAlignString(cbtnalign->iAlign, m_property_map) + L";"; pbtname = L"BUTTON," + GetAddalignButtonname(cbtnalign) + L";"; rc2 = L"RELATIVECRECT," + RectToString(cbtnalign->marginToBtn) + L";"; buttoninformation += agn2 + pbtname + rc2; while(pos) { if (!bfirstaddalign) { buttoninformation += L"ADDALIGN,"; bfirstaddalign = TRUE; } cbtnalign = cbtn->btnAlignList.GetNext(pos); agn2 = L"RELATIVEALIGN," + GetAlignString(cbtnalign->iAlign, m_property_map) + L";"; pbtname = L"BUTTON," + GetAddalignButtonname(cbtnalign) + L";"; rc2 = L"RELATIVECRECT," + RectToString(cbtnalign->marginToBtn) + L";"; buttoninformation += agn2 + pbtname + rc2; } } return buttoninformation; }
void GMPContentParent::CloseIfUnused() { GMP_LOG( "GMPContentParent::CloseIfUnused(this=%p) mVideoDecoders.IsEmpty=%s, " "mVideoEncoders.IsEmpty=%s, mChromiumCDMs.IsEmpty=%s, " "mCloseBlockerCount=%" PRIu32, this, GetBoolString(mVideoDecoders.IsEmpty()), GetBoolString(mVideoEncoders.IsEmpty()), GetBoolString(mChromiumCDMs.IsEmpty()), mCloseBlockerCount); if (mVideoDecoders.IsEmpty() && mVideoEncoders.IsEmpty() && mChromiumCDMs.IsEmpty() && mCloseBlockerCount == 0) { RefPtr<GMPContentParent> toClose; if (mParent) { toClose = mParent->ForgetGMPContentParent(); } else { toClose = this; RefPtr<GeckoMediaPluginServiceChild> gmp( GeckoMediaPluginServiceChild::GetSingleton()); gmp->RemoveGMPContentParent(toClose); } NS_DispatchToCurrentThread(NewRunnableMethod( "gmp::GMPContentParent::Close", toClose, &GMPContentParent::Close)); } }