widgets/widgetapp/src/WidgetUiObserver.cpp
changeset 1 7c90e6132015
parent 0 dd21522fd290
child 5 10e98eab6f85
equal deleted inserted replaced
0:dd21522fd290 1:7c90e6132015
   181         else
   181         else
   182             {
   182             {
   183             iWindow->SetSoftKeyLabelL( aKeySoftkey, aLabel );
   183             iWindow->SetSoftKeyLabelL( aKeySoftkey, aLabel );
   184             }
   184             }
   185         }
   185         }
       
   186     
       
   187     if (iWindow->WindowManager().ActiveWindow() && 
       
   188             iWindow->WindowManager().View()->CbaGroup()->IsVisible())
       
   189         {
       
   190         TBrCtlDefs::TBrCtlElementType elementtype =
       
   191                       iWindow->WindowManager().ActiveWindow()->Engine()->FocusedElementType();
       
   192         // Check if focused element type is editing type
       
   193         if ((elementtype != TBrCtlDefs::EElementActivatedInputBox) &&
       
   194                        (elementtype != TBrCtlDefs::EElementActivatedObjectBox))
       
   195             {
       
   196             iWindow->WindowManager().View()->ShowActivatedObject( EFalse );
       
   197             }        
       
   198         }
   186     }
   199     }
   187 
   200 
   188 // -----------------------------------------------------------------------------
   201 // -----------------------------------------------------------------------------
   189 // CWidgetUiObserver::HandleBrowserLoadEventL
   202 // CWidgetUiObserver::HandleBrowserLoadEventL
   190 // -----------------------------------------------------------------------------
   203 // -----------------------------------------------------------------------------
   229         // Convert URL form to a more friendly path form, with locale-specific subdirectory
   242         // Convert URL form to a more friendly path form, with locale-specific subdirectory
   230         TFileName lprojName;
   243         TFileName lprojName;
   231         iWindow->WindowManager().WidgetUIClientSession().GetLprojName( lprojName );
   244         iWindow->WindowManager().WidgetUIClientSession().GetLprojName( lprojName );
   232         TranslateURLToFilenameL( aEmbeddedUrl, lprojName ); 
   245         TranslateURLToFilenameL( aEmbeddedUrl, lprojName ); 
   233         
   246         
       
   247 		iFs.PrivatePath(iAppPrivatePath);        
   234         // TRUE if e:/private/10282822/*/* was requested. It may or may not be inside a widget's sandbox.
   248         // TRUE if e:/private/10282822/*/* was requested. It may or may not be inside a widget's sandbox.
   235         TBool isInsidePrivateDir = ( iFileName && ( (*iFileName).FindF(iAppPrivatePath) == KMaxDriveName ) ) ? ETrue : EFalse; 
   249         TBool isInsidePrivateDir = ( iFileName && ( (*iFileName).FindF(iAppPrivatePath) == KMaxDriveName ) ) ? ETrue : EFalse; 
   236 
   250 
   237         HBufC* widgetPath = iWindow->WidgetPath();          // The widget's sandbox. Object not ours.
   251         HBufC* widgetPath = iWindow->WidgetPath();          // The widget's sandbox. Object not ours.
   238         // TRUE if e:/private/10282822/<widgetID>/foo.js was requested. This is INSIDE widget's sandbox
   252         // TRUE if e:/private/10282822/<widgetID>/foo.js was requested. This is INSIDE widget's sandbox
   339 #endif
   353 #endif
   340 
   354 
   341     iHandler = CDocumentHandler::NewL( CEikonEnv::Static()->Process() ) ;
   355     iHandler = CDocumentHandler::NewL( CEikonEnv::Static()->Process() ) ;
   342         // Get WidgetUI's private directory (e.g. c:/private/10282822/)
   356         // Get WidgetUI's private directory (e.g. c:/private/10282822/)
   343     iCollectBitmapTimer = CIdle::NewL(CActive::EPriorityLow);
   357     iCollectBitmapTimer = CIdle::NewL(CActive::EPriorityLow);
       
   358     iFs.Connect();
   344     }
   359     }
   345 
   360 
   346 // -----------------------------------------------------------------------------
   361 // -----------------------------------------------------------------------------
   347 // CWidgetUiObserver::~CWidgetUiObserver
   362 // CWidgetUiObserver::~CWidgetUiObserver
   348 // -----------------------------------------------------------------------------
   363 // -----------------------------------------------------------------------------
   360     delete iFileName;
   375     delete iFileName;
   361     delete iHandler;
   376     delete iHandler;
   362     delete iSoftkeyExitStr;
   377     delete iSoftkeyExitStr;
   363     delete iLeftSoftkeyStr;
   378     delete iLeftSoftkeyStr;
   364     delete iCollectBitmapTimer; 
   379     delete iCollectBitmapTimer; 
       
   380     iFs.Close(); 
   365     }
   381     }
   366 
   382 
   367 // -----------------------------------------------------------------------------
   383 // -----------------------------------------------------------------------------
   368 // CWidgetUiObserver::NewL
   384 // CWidgetUiObserver::NewL
   369 // -----------------------------------------------------------------------------
   385 // -----------------------------------------------------------------------------