brctlsampleapploadeventobserver.cpp
来自「基于SYMBIAN手机智能操作系统,通过插件」· C++ 代码 · 共 75 行
CPP
75 行
/*
* ============================================================================
* Name : BrCtlSampleAppLoadEventObserver.cpp
* 基于SYMBIAN,通过插件方式,实现浏览器
* ============================================================================
*/
// INCLUDE FILES
#include "BrCtlSampleAppContainer.h"
#include "BrCtlSampleAppLoadEventObserver.h"
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// CBrCtlSampleAppLoadEventObserver::HandleBrowserLoadEventL
// ---------------------------------------------------------
//
void
CBrCtlSampleAppLoadEventObserver::HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent,
TUint aSize,
TUint16 aTransactionId)
{
// Here we are creating a text string to be displayed on the screen, but if
// you were implementing this method, you would most likely be displaying a
// progress bar.
TBuf16<256> tgt;
_LIT(KHandleBrowserLoadEvent, "Load event = %d, size = %d, trId = %d");
tgt.AppendFormat(KHandleBrowserLoadEvent, aLoadEvent, aSize, aTransactionId);
iContainer->SetText(tgt);
iContainer->DrawNow();
}
// ---------------------------------------------------------
// CBrCtlSampleAppLoadEventObserver::ConstructL
// ---------------------------------------------------------
//
void
CBrCtlSampleAppLoadEventObserver::ConstructL(CBrCtlSampleAppContainer* aContainer)
{
iContainer = aContainer;
}
// ---------------------------------------------------------
// CBrCtlSampleAppLoadEventObserver::~CBrCtlSampleAppLoadEventObserver
// ---------------------------------------------------------
//
CBrCtlSampleAppLoadEventObserver::~CBrCtlSampleAppLoadEventObserver()
{
}
// ---------------------------------------------------------
// CBrCtlSampleAppLoadEventObserver::NewL
// ---------------------------------------------------------
//
CBrCtlSampleAppLoadEventObserver*
CBrCtlSampleAppLoadEventObserver::NewL(CBrCtlSampleAppContainer* aContainer)
{
CBrCtlSampleAppLoadEventObserver* self = new(ELeave)CBrCtlSampleAppLoadEventObserver;
CleanupStack::PushL(self);
self->ConstructL(aContainer);
CleanupStack::Pop();
return self;
}
// End of File
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?