353 // set AP to be a default one (for Push messages) |
353 // set AP to be a default one (for Push messages) |
354 SetRequestedAP( Preferences().DefaultAccessPoint() ); |
354 SetRequestedAP( Preferences().DefaultAccessPoint() ); |
355 // get client rect before hiding CBAs |
355 // get client rect before hiding CBAs |
356 TRect rect = ClientRect(); |
356 TRect rect = ClientRect(); |
357 Cba()->MakeVisible( EFalse ); |
357 Cba()->MakeVisible( EFalse ); |
|
358 //------------------------------------------------------------------------- |
|
359 // Create bookmarkview |
|
360 PERFLOG_STOPWATCH_START; |
|
361 CBrowserBookmarksView* bookmarksView = NULL; |
|
362 TInt folderUid = doc->GetFolderToOpen(); |
|
363 if ( IsEmbeddedModeOn() && folderUid!= KFavouritesRootUid) |
|
364 { |
|
365 bookmarksView = CBrowserBookmarksView::NewLC( *this, *iRecentUrlStore, folderUid ); |
|
366 } |
|
367 else |
|
368 { |
|
369 bookmarksView = CBrowserBookmarksView::NewLC( *this, *iRecentUrlStore ); |
|
370 } |
|
371 PERFLOG_STOP_WRITE("\t BMView NewL") |
|
372 |
|
373 iBookmarksView = bookmarksView; |
|
374 |
|
375 AddViewL( bookmarksView ); // transfer ownership to CAknViewAppUi |
|
376 CleanupStack::Pop(); // bookmarksView |
|
377 BROWSER_LOG( ( _L( "Bookmarksview up" ) ) ); |
358 |
378 |
359 //------------------------------------------------------------------------- |
379 //------------------------------------------------------------------------- |
360 // Create ContentView |
380 // Create ContentView |
361 |
381 |
362 PERFLOG_STOPWATCH_START; |
382 PERFLOG_STOPWATCH_START; |
415 contentView->Container()->FindKeywordPane()->SetOrdinalPosition( 0 ); |
435 contentView->Container()->FindKeywordPane()->SetOrdinalPosition( 0 ); |
416 contentView->Container()->GotoPane()->SetOrdinalPosition( 0 ); |
436 contentView->Container()->GotoPane()->SetOrdinalPosition( 0 ); |
417 |
437 |
418 //------------------------------------------------------------------------- |
438 //------------------------------------------------------------------------- |
419 |
439 |
420 PERFLOG_STOPWATCH_START; |
|
421 CBrowserBookmarksView* bookmarksView = NULL; |
|
422 TInt folderUid = doc->GetFolderToOpen(); |
|
423 if ( IsEmbeddedModeOn() && folderUid!= KFavouritesRootUid) |
|
424 { |
|
425 bookmarksView = CBrowserBookmarksView::NewLC( *this, *iRecentUrlStore, folderUid ); |
|
426 } |
|
427 else |
|
428 { |
|
429 bookmarksView = CBrowserBookmarksView::NewLC( *this, *iRecentUrlStore ); |
|
430 } |
|
431 PERFLOG_STOP_WRITE("\t BMView NewL") |
|
432 |
|
433 iBookmarksView = bookmarksView; |
|
434 |
|
435 AddViewL( bookmarksView ); // transfer ownership to CAknViewAppUi |
|
436 CleanupStack::Pop(); // bookmarksView |
|
437 BROWSER_LOG( ( _L( "Bookmarksview up" ) ) ); |
|
438 |
440 |
439 CBrowserSettingsView* settingsView = CBrowserSettingsView::NewLC( *this ); |
441 CBrowserSettingsView* settingsView = CBrowserSettingsView::NewLC( *this ); |
440 AddViewL( settingsView ); // transfer ownership to CAknViewAppUi |
442 AddViewL( settingsView ); // transfer ownership to CAknViewAppUi |
441 CleanupStack::Pop(); // settingsView |
443 CleanupStack::Pop(); // settingsView |
442 BROWSER_LOG( ( _L( "SettingsView up" ) ) ); |
444 BROWSER_LOG( ( _L( "SettingsView up" ) ) ); |
443 |
445 |
444 CBrowserWindowSelectionView* windowSelectionView = CBrowserWindowSelectionView::NewLC( *this ); |
446 CBrowserWindowSelectionView* windowSelectionView = CBrowserWindowSelectionView::NewLC( *this ); |
445 AddViewL( windowSelectionView ); // transfer ownership to CAknViewAppUi |
447 AddViewL( windowSelectionView ); // transfer ownership to CAknViewAppUi |
446 CleanupStack::Pop(); // windowSelectionView |
448 CleanupStack::Pop(); // windowSelectionView |
447 BROWSER_LOG( ( _L( "windowSelectionView up" ) ) ); |
449 BROWSER_LOG( ( _L( "windowSelectionView up" ) ) ); |
448 |
|
449 CBrowserInitialView* initialView = CBrowserInitialView::NewLC( *this ); |
|
450 AddViewL( initialView ); // transfer ownership to CAknViewAppUi |
|
451 CleanupStack::Pop(); // initialView |
|
452 BROWSER_LOG( ( _L( "initialView up" ) ) ); |
|
453 |
450 |
454 //------------------------------------------------------------------------- |
451 //------------------------------------------------------------------------- |
455 |
452 |
456 iIdle = CIdle::NewL( CActive::EPriorityIdle ); |
453 iIdle = CIdle::NewL( CActive::EPriorityIdle ); |
457 |
454 |
1116 { |
1113 { |
1117 ActivateLocalViewL( iViewToBeActivatedIfNeeded ); |
1114 ActivateLocalViewL( iViewToBeActivatedIfNeeded ); |
1118 } |
1115 } |
1119 else |
1116 else |
1120 { |
1117 { |
1121 // LastActiveViewId() might return with 0! |
1118 TVwsViewId activeViewId; |
1122 TRAP_IGNORE( ActivateLocalViewL( LastActiveViewId() ) ); |
1119 if( ( GetActiveViewId( activeViewId ) == KErrNone ) && |
1123 } |
1120 ( LastActiveViewId() != activeViewId.iViewUid ) ) |
|
1121 { |
|
1122 // LastActiveViewId() might return with 0! |
|
1123 TRAP_IGNORE( ActivateLocalViewL( LastActiveViewId() ) ); |
|
1124 } |
|
1125 } |
1124 } |
1126 } |
1125 iViewToBeActivatedIfNeeded.iUid = 0; |
1127 iViewToBeActivatedIfNeeded.iUid = 0; |
1126 CAknViewAppUi::HandleForegroundEventL( aForeground ); |
1128 CAknViewAppUi::HandleForegroundEventL( aForeground ); |
1127 |
1129 |
1128 if( iIsForeground ) |
1130 if( iIsForeground ) |
1648 TPtr cnameDes = cname->Des(); |
1644 TPtr cnameDes = cname->Des(); |
1649 |
1645 |
1650 cnameDes.Append( cnameLeft ); |
1646 cnameDes.Append( cnameLeft ); |
1651 cnameDes.AppendFill( TChar(KDot),5 ); // '.....' |
1647 cnameDes.AppendFill( TChar(KDot),5 ); // '.....' |
1652 cnameDes.Append( cnameRight ); |
1648 cnameDes.Append( cnameRight ); |
1653 iRecentUrlStore->SaveData(*url,*cname); |
1649 iRecentUrlStore->SaveDataL(*url,*cname); |
1654 CleanupStack::PopAndDestroy();//cname |
1650 CleanupStack::PopAndDestroy();//cname |
1655 } |
1651 } |
1656 else |
1652 else |
1657 { |
1653 { |
1658 iRecentUrlStore->SaveData(*url,*url); |
1654 iRecentUrlStore->SaveDataL(*url,*url); |
1659 } |
1655 } |
1660 } |
1656 } |
1661 } |
1657 } |
1662 CleanupStack().PopAndDestroy(2); // url, name |
1658 CleanupStack().PopAndDestroy(2); // url, name |
1663 } |
1659 } |
1682 TPtr cnameDes = cname->Des(); |
1678 TPtr cnameDes = cname->Des(); |
1683 |
1679 |
1684 cnameDes.Append( cnameLeft ); |
1680 cnameDes.Append( cnameLeft ); |
1685 cnameDes.AppendFill( TChar(KDot),5 ); // '.....' |
1681 cnameDes.AppendFill( TChar(KDot),5 ); // '.....' |
1686 cnameDes.Append( cnameRight ); |
1682 cnameDes.Append( cnameRight ); |
1687 iRecentUrlStore->SaveData(*url,*cname); |
1683 iRecentUrlStore->SaveDataL(*url,*cname); |
1688 CleanupStack::PopAndDestroy();//cname |
1684 CleanupStack::PopAndDestroy();//cname |
1689 } |
1685 } |
1690 else |
1686 else |
1691 { |
1687 { |
1692 iRecentUrlStore->SaveData(*url,*url); |
1688 iRecentUrlStore->SaveDataL(*url,*url); |
1693 } |
1689 } |
1694 } |
1690 } |
1695 CleanupStack().PopAndDestroy(); // url |
1691 CleanupStack().PopAndDestroy(); // url |
1696 } |
1692 } |
1697 } |
1693 } |
2376 Display().StopProgressAnimationL(); |
2372 Display().StopProgressAnimationL(); |
2377 if ( Fetching() ) |
2373 if ( Fetching() ) |
2378 { |
2374 { |
2379 CancelFetch(); |
2375 CancelFetch(); |
2380 } |
2376 } |
|
2377 //Close the uploading dialog. |
|
2378 iDialogsProvider->UploadProgressNoteL( |
|
2379 0, 0, ETrue, (MBrowserDialogsProviderObserver *)this ); |
2381 |
2380 |
2382 // SendDisconnectEventL(); |
2381 // SendDisconnectEventL(); |
2383 // not needed as by that point HTTPSession was already shutdown by executing disconnect menu option |
2382 // not needed as by that point HTTPSession was already shutdown by executing disconnect menu option |
2384 // will cause a crash when user tries to quickly reconnect right after disconnecting, as HTTP session |
2383 // will cause a crash when user tries to quickly reconnect right after disconnecting, as HTTP session |
2385 // is starting to initialize, while this call is trying to close it. |
2384 // is starting to initialize, while this call is trying to close it. |