ginebra2/emulator/BrowserMainS60.cpp
changeset 15 73c48011b8c7
parent 6 1c3b8676e58c
equal deleted inserted replaced
13:491a1d15372f 15:73c48011b8c7
    25 /*
    25 /*
    26  * Handles calls from other apps to QDesktopServices.openUrl
    26  * Handles calls from other apps to QDesktopServices.openUrl
    27  */
    27  */
    28 
    28 
    29 // This function handles when an app calls QDesktopServices.openUrl when the browser is already started
    29 // This function handles when an app calls QDesktopServices.openUrl when the browser is already started
    30 MCoeMessageObserver::TMessageResponse BrowserMainAppUiS60::HandleMessageL(TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, const TDesC8 &aMessageParameters)
    30 MCoeMessageObserver::TMessageResponse BrowserMainAppUiS60::HandleMessageL(TUint32 /*aClientHandleOfTargetWindowGroup*/, TUid /*aMessageUid*/, const TDesC8 &aMessageParameters)
    31 {
    31 {
    32     QString url = QString::fromUtf8((const char *)aMessageParameters.Ptr(), aMessageParameters.Length());
    32     QString url = QString::fromUtf8((const char *)aMessageParameters.Ptr(), aMessageParameters.Length());
    33     //qDebug() << "BrowserMainAppUiS60::HandleMessageL " <<
    33     //qDebug() << "BrowserMainAppUiS60::HandleMessageL " <<
    34     //        QString::fromUtf16(aMessageUid.Name().Ptr(), aMessageUid.Name().Length()) << ", " << url;
    34     //        QString::fromUtf16(aMessageUid.Name().Ptr(), aMessageUid.Name().Length()) << ", " << url;
    35     // I have no idea if the browser is thread-safe and what will happen when it receives this signal when it's in the middle of something else - mm
    35     // I have no idea if the browser is thread-safe and what will happen when it receives this signal when it's in the middle of something else - mm
    54 //    {
    54 //    {
    55 //        qDebug() << "BrowserMainAppUiS60::HandleCommandL - " << aCommand;
    55 //        qDebug() << "BrowserMainAppUiS60::HandleCommandL - " << aCommand;
    56 //    }
    56 //    }
    57 
    57 
    58 // These functions handle when an app calls QDesktopServices.openUrl when the browser isn't already started
    58 // These functions handle when an app calls QDesktopServices.openUrl when the browser isn't already started
    59 TBool BrowserMainAppUiS60::ProcessCommandParametersL(TApaCommand aCommand,TFileName& aFilename)
    59 TBool BrowserMainAppUiS60::ProcessCommandParametersL(TApaCommand /*aCommand*/,TFileName& aFilename)
    60 {
    60 {
    61     //qDebug() << "BrowserMainAppUiS60:: ProcessCmdParms2 - " << aCommand << ", " << QString::fromUtf16(aFilename.Ptr(), aFilename.Length());
    61     //qDebug() << "BrowserMainAppUiS60:: ProcessCmdParms2 - " << aCommand << ", " << QString::fromUtf16(aFilename.Ptr(), aFilename.Length());
    62 //        ((RealBrowserApp *)QApplication::instance())->setInitialUrl(QString::fromUtf16(aFilename.Ptr(), aFilename.Length()));
    62 //        ((RealBrowserApp *)QApplication::instance())->setInitialUrl(QString::fromUtf16(aFilename.Ptr(), aFilename.Length()));
    63     ((BrowserMainApplicationS60 *)Application())->SetInitialUrl(QString::fromUtf16(aFilename.Ptr(), aFilename.Length()));
    63     ((BrowserMainApplicationS60 *)Application())->SetInitialUrl(QString::fromUtf16(aFilename.Ptr(), aFilename.Length()));
    64     return ETrue;
    64     return ETrue;
    65 }
    65 }
    66 
    66 
    67 TBool BrowserMainAppUiS60::ProcessCommandParametersL(TApaCommand aCommand,TFileName& aFilename, const TDesC8& aTail)
    67 TBool BrowserMainAppUiS60::ProcessCommandParametersL(TApaCommand /*aCommand*/,TFileName& aFilename, const TDesC8& /*aTail*/)
    68 {
    68 {
    69     //qDebug()
    69     //qDebug()
    70     //       << "BrowserMainAppUiS60:: ProcessCmdParms3 - " << aCommand << ", "
    70     //       << "BrowserMainAppUiS60:: ProcessCmdParms3 - " << aCommand << ", "
    71     //       << QString::fromUtf16(aFilename.Ptr(), aFilename.Length()) << ", "
    71     //       << QString::fromUtf16(aFilename.Ptr(), aFilename.Length()) << ", "
    72     //       << QString::fromUtf8((const char*)aTail.Ptr(), aTail.Length());
    72     //       << QString::fromUtf8((const char*)aTail.Ptr(), aTail.Length());