browserui/browser/BrowserAppSrc/BrowserAppUi.cpp
branchRCL_3
changeset 58 aead3f7e1bb0
parent 56 3154c14a33db
child 60 b149f0820e5a
equal deleted inserted replaced
56:3154c14a33db 58:aead3f7e1bb0
   175 CBrowserAppUi::~CBrowserAppUi()
   175 CBrowserAppUi::~CBrowserAppUi()
   176     {
   176     {
   177     LOG_ENTERFN("CBrowserAppUi::~CBrowserAppUi");
   177     LOG_ENTERFN("CBrowserAppUi::~CBrowserAppUi");
   178 
   178 
   179 #ifdef BRDO_IAD_UPDATE_ENABLED_FF
   179 #ifdef BRDO_IAD_UPDATE_ENABLED_FF
       
   180     delete iDelayedUpdate;
   180     iFs.Close();
   181     iFs.Close();
   181 #endif
   182 #endif
   182     
   183     
   183     SetExitInProgress( ETrue );
   184     SetExitInProgress( ETrue );
   184     if(iBrowserAsyncExit)
   185     if(iBrowserAsyncExit)
   294     	}
   295     	}
   295 	else
   296 	else
   296 		{
   297 		{
   297 		iStartedUp = EFalse;
   298 		iStartedUp = EFalse;
   298 		LOG_WRITE( "Browser started embedded" );
   299 		LOG_WRITE( "Browser started embedded" );
   299 		}
   300 		}        
   300 #ifdef BRDO_IAD_UPDATE_ENABLED_FF
       
   301     User::LeaveIfError(iFs.Connect());
       
   302     // Check updates from IAD, continue UI launching even if something fails there  
       
   303     TRAP_IGNORE( CheckUpdatesL() );
       
   304 #endif
       
   305         
       
   306 PERFLOG_STOP_WRITE("BrowserUI::ConstructL");
   301 PERFLOG_STOP_WRITE("BrowserUI::ConstructL");
   307 
   302 
   308     }
   303     }
   309 #ifdef BRDO_IAD_UPDATE_ENABLED_FF
   304 #ifdef BRDO_IAD_UPDATE_ENABLED_FF
   310 // ---------------------------------------------------------
   305 // ---------------------------------------------------------
   312 // ---------------------------------------------------------
   307 // ---------------------------------------------------------
   313 void CBrowserAppUi::CheckUpdatesL()
   308 void CBrowserAppUi::CheckUpdatesL()
   314     {
   309     {
   315     LOG_ENTERFN("CBrowserAppUi::CheckUpdatesL");
   310     LOG_ENTERFN("CBrowserAppUi::CheckUpdatesL");
   316     LOG_WRITE( "CBrowserAppUi::CheckUpdatesL() entering" );
   311     LOG_WRITE( "CBrowserAppUi::CheckUpdatesL() entering" );
       
   312     User::LeaveIfError(iFs.Connect());
   317     if ( FeatureManager::FeatureSupported( KFeatureIdIAUpdate ) )
   313     if ( FeatureManager::FeatureSupported( KFeatureIdIAUpdate ) )
   318         {
   314         {
   319         LOG_WRITE( "CBrowserAppUi::CheckUpdatesL() IAD Update supported" );
   315         LOG_WRITE( "CBrowserAppUi::CheckUpdatesL() IAD Update supported" );
   320         TRAP_IGNORE( iUpdate = CIAUpdate::NewL( *this ) );
   316         TRAP_IGNORE( iUpdate = CIAUpdate::NewL( *this ) );
   321         LOG_WRITE( "CBrowserAppUi::CheckUpdatesL() IAD Update Client Created" );
   317         LOG_WRITE( "CBrowserAppUi::CheckUpdatesL() IAD Update Client Created" );
   633             BROWSER_LOG( ( _L( "WindowManager Up. MWs not supported." ) ) );
   629             BROWSER_LOG( ( _L( "WindowManager Up. MWs not supported." ) ) );
   634             }
   630             }
   635 
   631 
   636         PERFLOG_STOP_WRITE("\t WindowMgr + PopUp Engine");
   632         PERFLOG_STOP_WRITE("\t WindowMgr + PopUp Engine");
   637         contentView->SetZoomLevelL();
   633         contentView->SetZoomLevelL();
   638         contentView->Container()->FindKeywordPane()->SetOrdinalPosition( 0 );
       
   639         contentView->Container()->GotoPane()->SetOrdinalPosition( 0 );
       
   640 
   634 
   641         //-------------------------------------------------------------------------
   635         //-------------------------------------------------------------------------
   642 
   636 
   643 
   637 
   644         CBrowserSettingsView* settingsView = CBrowserSettingsView::NewLC( *this );
   638         CBrowserSettingsView* settingsView = CBrowserSettingsView::NewLC( *this );
   660         iStartedUp = ETrue;
   654         iStartedUp = ETrue;
   661         iSecureSiteVisited = EFalse;
   655         iSecureSiteVisited = EFalse;
   662 
   656 
   663 	    iPushMtmObserver = CBrowserPushMtmObserver::NewL( this );
   657 	    iPushMtmObserver = CBrowserPushMtmObserver::NewL( this );
   664 	    iPushMtmObserver->StartObserver();
   658 	    iPushMtmObserver->StartObserver();
       
   659         // Create two Panes of CBrowserContentViewContainer
       
   660         CBrowserGotoPane* gotoPane = CBrowserGotoPane::NewL( contentView->Container(),
       
   661                  EMbmAvkonQgn_indi_find_goto,
       
   662                  EMbmAvkonQgn_indi_find_goto_mask,
       
   663                  ETrue,
       
   664                  contentView );
       
   665                           
       
   666         // Create the find pane with magnifier glass icon, and
       
   667         // without adaptive popup list...
       
   668         CBrowserGotoPane* findKeywordPane = CBrowserGotoPane::NewL( contentView->Container(),
       
   669                  EMbmAvkonQgn_indi_find_glass,
       
   670                  EMbmAvkonQgn_indi_find_glass_mask,
       
   671                  EFalse,
       
   672                  contentView,
       
   673                  ETrue );
       
   674         contentView->Container()->SetGotoPane(gotoPane);
       
   675         contentView->Container()->SetFindKeywordPane(findKeywordPane);
       
   676         contentView->Container()->SetRect( rect );
       
   677         contentView->Container()->GotoPane()->SetGPObserver(contentView);
       
   678         contentView->Container()->FindKeywordPane()->SetGPObserver(contentView);
       
   679         contentView->Container()->FindKeywordPane()->SetOrdinalPosition( 0 );
       
   680         contentView->Container()->GotoPane()->SetOrdinalPosition( 0 );
       
   681 
   665 #ifdef BRDO_OCC_ENABLED_FF
   682 #ifdef BRDO_OCC_ENABLED_FF
   666         iRetryConnectivity = CPeriodic::NewL(CActive::EPriorityStandard);
   683         iRetryConnectivity = CPeriodic::NewL(CActive::EPriorityStandard);
       
   684 #endif
       
   685 
       
   686 #ifdef BRDO_IAD_UPDATE_ENABLED_FF
       
   687     iDelayedUpdate = CIdle::NewL( CActive::EPriorityIdle );
       
   688     iDelayedUpdate->Start(TCallBack( CompleteIADUpdateCallback, this ));
   667 #endif
   689 #endif
   668         } //if (iStartedUp)
   690         } //if (iStartedUp)
   669     }
   691     }
   670 
   692 
   671 // -----------------------------------------------------------------------------
   693 // -----------------------------------------------------------------------------
  1679             TRAP_IGNORE( iFeedsClientUtilities->DisconnectFeedsViewL() );
  1701             TRAP_IGNORE( iFeedsClientUtilities->DisconnectFeedsViewL() );
  1680             //notify feeds engine to close the connection
  1702             //notify feeds engine to close the connection
  1681             TRAP_IGNORE( iFeedsClientUtilities->DisconnectManualUpdateConnectionL() );
  1703             TRAP_IGNORE( iFeedsClientUtilities->DisconnectManualUpdateConnectionL() );
  1682 #endif
  1704 #endif
  1683     		}
  1705     		}
  1684         PrepareToExit();
  1706         if (SpecialLoadObserver().IsConnectionStarted()) 
  1685         Exit();
  1707             {
       
  1708             if ( iWindowManager ) 
       
  1709                {
       
  1710                BROWSER_LOG( ( _L( " iWindowManager->SetUserExit( iUserExit )" ) ) );
       
  1711                iWindowManager->SetUserExit( iUserExit );
       
  1712                }
       
  1713                delete iWindowManager;
       
  1714                BROWSER_LOG( ( _L( " User::Exit(KErrNone)" ) ) );
       
  1715                User::Exit(KErrNone);
       
  1716             }
       
  1717         else
       
  1718             {
       
  1719             PrepareToExit();
       
  1720             Exit();
       
  1721             }
  1686     	}
  1722     	}
  1687     else
  1723     else
  1688     	{
  1724     	{
  1689     	BROWSER_LOG( ( _L( " Exit()" ) ) );
  1725     	BROWSER_LOG( ( _L( " Exit()" ) ) );
  1690     	if ( iConnection )
  1726     	if ( iConnection )
  2726         TRAP_IGNORE( BrCtlInterface().HandleCommandL( (TInt)TBrCtlDefs::ECommandUnSetRetryConnectivityFlag + (TInt)TBrCtlDefs::ECommandIdBase ) );
  2762         TRAP_IGNORE( BrCtlInterface().HandleCommandL( (TInt)TBrCtlDefs::ECommandUnSetRetryConnectivityFlag + (TInt)TBrCtlDefs::ECommandIdBase ) );
  2727         SetRetryFlag(EFalse);
  2763         SetRetryFlag(EFalse);
  2728         BROWSER_LOG( ( _L( "CBrowserAppUi::RetryInternetConnection clear queued transactions " ) ) );
  2764         BROWSER_LOG( ( _L( "CBrowserAppUi::RetryInternetConnection clear queued transactions " ) ) );
  2729         TRAP_IGNORE( BrCtlInterface().HandleCommandL( (TInt)TBrCtlDefs::ECommandClearQuedTransactions + (TInt)TBrCtlDefs::ECommandIdBase ) );
  2765         TRAP_IGNORE( BrCtlInterface().HandleCommandL( (TInt)TBrCtlDefs::ECommandClearQuedTransactions + (TInt)TBrCtlDefs::ECommandIdBase ) );
  2730         Display().StopProgressAnimationL(); //Stop Progress animation
  2766         Display().StopProgressAnimationL(); //Stop Progress animation
       
  2767         if ( Fetching() )
       
  2768             {
       
  2769             BROWSER_LOG( ( _L( "CBrowserAppUi::RetryInternetConnection cancel fetch " ) ) );
       
  2770             CancelFetch();
       
  2771             }
  2731         iDialogsProvider->UploadProgressNoteL(0, 0, ETrue, (MBrowserDialogsProviderObserver *)this ); //Close the uploading dialog.
  2772         iDialogsProvider->UploadProgressNoteL(0, 0, ETrue, (MBrowserDialogsProviderObserver *)this ); //Close the uploading dialog.
  2732         iDialogsProvider->CancelAll(); //connection has been lost, so cancel the authentication dialog.
  2773         iDialogsProvider->CancelAll(); //connection has been lost, so cancel the authentication dialog.
  2733         }
  2774         }
  2734     
  2775     
  2735     return err;
  2776     return err;
  3401                 if ((Preferences().HomePageType() == EWmlSettingsHomePageAddress)
  3442                 if ((Preferences().HomePageType() == EWmlSettingsHomePageAddress)
  3402                    ||(Preferences().HomePageType() == EWmlSettingsHomePageUseCurrent))
  3443                    ||(Preferences().HomePageType() == EWmlSettingsHomePageUseCurrent))
  3403                 	{                         
  3444                 	{                         
  3404                 	TRAP( err, homePgFound = Preferences().HomePageUrlL( ptr, ETrue ) );
  3445                 	TRAP( err, homePgFound = Preferences().HomePageUrlL( ptr, ETrue ) );
  3405                 	}
  3446                 	}
  3406                 }
  3447                 	}
  3407             // we have a url to load
  3448             // we have a url to load
  3408             if( err == KErrNone &&
  3449             if( err == KErrNone &&
  3409                 homePgFound == KErrNone &&
  3450                 homePgFound == KErrNone &&
  3410                 ptr.Length() > 0 )
  3451                 ptr.Length() > 0 )
  3411                 {
  3452                 {
  4558     if( error != KErrNone )
  4599     if( error != KErrNone )
  4559         {
  4600         {
  4560         CloseContentViewL();
  4601         CloseContentViewL();
  4561         }                
  4602         }                
  4562     }
  4603     }
       
  4604     
  4563 #ifdef BRDO_IAD_UPDATE_ENABLED_FF
  4605 #ifdef BRDO_IAD_UPDATE_ENABLED_FF
       
  4606 // ---------------------------------------------------------
       
  4607 // CBrowserAppUi::CompleteIADUpdateCallback
       
  4608 // ---------------------------------------------------------
       
  4609 TInt CBrowserAppUi::CompleteIADUpdateCallback( TAny* aBrowserAppUi )
       
  4610     {
       
  4611     TRAP_IGNORE( ((CBrowserAppUi*)aBrowserAppUi)->CheckUpdatesL() )
       
  4612     return KErrNone;
       
  4613     }
       
  4614 
       
  4615 
  4564 // ---------------------------------------------------------
  4616 // ---------------------------------------------------------
  4565 // CBrowserAppUi::CheckUpdateFileAvailable
  4617 // CBrowserAppUi::CheckUpdateFileAvailable
  4566 // ---------------------------------------------------------
  4618 // ---------------------------------------------------------
  4567 TBool CBrowserAppUi::CheckUpdateFileAvailable()
  4619 TBool CBrowserAppUi::CheckUpdateFileAvailable()
  4568     {
  4620     {