wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowsercontainer.cpp
changeset 23 493788a4a8a4
parent 0 95b198f216e5
child 24 8cdda00a45da
equal deleted inserted replaced
5:79d62d1d7957 23:493788a4a8a4
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // INCLUDE FILES
    19 // INCLUDE FILES
    20 #include <akndef.h>
    20 #include <AknDef.h>
    21 #include <aknview.h>
    21 #include <aknview.h>
    22 #include <brctlinterface.h>
    22 #include <brctlinterface.h>
    23 #include "wmdrmdlabrowserview.h"
    23 #include "wmdrmdlabrowserview.h"
    24 #include "wmdrmdlabrowsercontainer.h"
    24 #include "wmdrmdlabrowsercontainer.h"
    25 
    25 
    33     MBrCtlSpecialLoadObserver* aObserver )
    33     MBrCtlSpecialLoadObserver* aObserver )
    34     {
    34     {
    35     CreateWindowL();
    35     CreateWindowL();
    36     SetRect( iView->ClientRect() );
    36     SetRect( iView->ClientRect() );
    37     ActivateL();
    37     ActivateL();
    38     
    38 
    39     iBrCtlInterface = CreateBrowserControlL(
    39     iBrCtlInterface = CreateBrowserControlL(
    40             this,                                      // parent control
    40             this,                                      // parent control
    41             iView->ClientRect(),                       // client rect
    41             iView->ClientRect(),                       // client rect
    42             TBrCtlDefs::ECapabilityLoadHttpFw |
    42             TBrCtlDefs::ECapabilityLoadHttpFw |
    43             TBrCtlDefs::ECapabilityDisplayScrollBar |
    43             TBrCtlDefs::ECapabilityDisplayScrollBar |
    51             NULL,                                      // Dialog provider
    51             NULL,                                      // Dialog provider
    52             NULL,                                      // window observer
    52             NULL,                                      // window observer
    53             NULL                                       // Download observer
    53             NULL                                       // Download observer
    54             );
    54             );
    55 
    55 
    56     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsAutoLoadImages, 
    56     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsAutoLoadImages,
    57                                          ETrue );    
       
    58     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsCookiesEnabled, 
       
    59                                          ETrue );
    57                                          ETrue );
    60     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsEmbedded, 
    58     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsCookiesEnabled,
       
    59                                          ETrue );
       
    60     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsEmbedded,
    61                                          ETrue );
    61                                          ETrue );
    62     }
    62     }
    63 
    63 
    64 // ---------------------------------------------------------------------------
    64 // ---------------------------------------------------------------------------
    65 // CWmDrmDlaBrowserContainer::CWmDrmDlaBrowserContainer
    65 // CWmDrmDlaBrowserContainer::CWmDrmDlaBrowserContainer
    76 //
    76 //
    77 CWmDrmDlaBrowserContainer* CWmDrmDlaBrowserContainer::NewL(
    77 CWmDrmDlaBrowserContainer* CWmDrmDlaBrowserContainer::NewL(
    78     CAknView* aView,
    78     CAknView* aView,
    79     MBrCtlSpecialLoadObserver* aObserver )
    79     MBrCtlSpecialLoadObserver* aObserver )
    80     {
    80     {
    81     CWmDrmDlaBrowserContainer* self 
    81     CWmDrmDlaBrowserContainer* self
    82         = CWmDrmDlaBrowserContainer::NewLC( aView, aObserver );
    82         = CWmDrmDlaBrowserContainer::NewLC( aView, aObserver );
    83     CleanupStack::Pop( self );
    83     CleanupStack::Pop( self );
    84     return self;
    84     return self;
    85     }
    85     }
    86 
    86 
    87 
    87 
    88 // ---------------------------------------------------------------------------
    88 // ---------------------------------------------------------------------------
    89 // CWmDrmDlaBrowserContainer::NewLC
    89 // CWmDrmDlaBrowserContainer::NewLC
    90 // ---------------------------------------------------------------------------
    90 // ---------------------------------------------------------------------------
    91 //
    91 //
    92 CWmDrmDlaBrowserContainer* CWmDrmDlaBrowserContainer::NewLC( 
    92 CWmDrmDlaBrowserContainer* CWmDrmDlaBrowserContainer::NewLC(
    93     CAknView* aView,
    93     CAknView* aView,
    94     MBrCtlSpecialLoadObserver* aObserver )
    94     MBrCtlSpecialLoadObserver* aObserver )
    95     {
    95     {
    96     CWmDrmDlaBrowserContainer* self 
    96     CWmDrmDlaBrowserContainer* self
    97         = new( ELeave ) CWmDrmDlaBrowserContainer( aView );
    97         = new( ELeave ) CWmDrmDlaBrowserContainer( aView );
    98     CleanupStack::PushL( self );
    98     CleanupStack::PushL( self );
    99     self->ConstructL( aObserver );
    99     self->ConstructL( aObserver );
   100     return self;
   100     return self;
   101     }
   101     }
   137 // ---------------------------------------------------------------------------
   137 // ---------------------------------------------------------------------------
   138 //
   138 //
   139 void CWmDrmDlaBrowserContainer::SizeChanged()
   139 void CWmDrmDlaBrowserContainer::SizeChanged()
   140     {
   140     {
   141     if ( iBrCtlInterface )
   141     if ( iBrCtlInterface )
   142         {            
   142         {
   143         iBrCtlInterface->SetRect( Rect() );
   143         iBrCtlInterface->SetRect( Rect() );
   144         }
   144         }
   145     }
   145     }
   146 
   146 
   147 // ---------------------------------------------------------------------------
   147 // ---------------------------------------------------------------------------
   150 //
   150 //
   151 CCoeControl* CWmDrmDlaBrowserContainer::ComponentControl(
   151 CCoeControl* CWmDrmDlaBrowserContainer::ComponentControl(
   152     TInt aIndex ) const
   152     TInt aIndex ) const
   153     {
   153     {
   154     switch ( aIndex )
   154     switch ( aIndex )
   155         {            
   155         {
   156         case 0:
   156         case 0:
   157             return iBrCtlInterface;
   157             return iBrCtlInterface;
   158         
   158 
   159         default:
   159         default:
   160             return NULL;
   160             return NULL;
   161         }
   161         }
   162     }
   162     }
   163     
   163 
   164 // ---------------------------------------------------------------------------
   164 // ---------------------------------------------------------------------------
   165 // CWmDrmDlaBrowserContainer::OfferKeyEventL
   165 // CWmDrmDlaBrowserContainer::OfferKeyEventL
   166 // ---------------------------------------------------------------------------
   166 // ---------------------------------------------------------------------------
   167 //
   167 //
   168 TKeyResponse CWmDrmDlaBrowserContainer::OfferKeyEventL( 
   168 TKeyResponse CWmDrmDlaBrowserContainer::OfferKeyEventL(
   169     const TKeyEvent& aKeyEvent,
   169     const TKeyEvent& aKeyEvent,
   170     TEventCode aType )
   170     TEventCode aType )
   171     {
   171     {
   172     if ( iBrCtlInterface )
   172     if ( iBrCtlInterface )
   173         {
   173         {
   178 
   178 
   179 // ---------------------------------------------------------------------------
   179 // ---------------------------------------------------------------------------
   180 // CWmDrmDlaBrowserContainer::FocusChanged
   180 // CWmDrmDlaBrowserContainer::FocusChanged
   181 // ---------------------------------------------------------------------------
   181 // ---------------------------------------------------------------------------
   182 //
   182 //
   183 void CWmDrmDlaBrowserContainer::FocusChanged( 
   183 void CWmDrmDlaBrowserContainer::FocusChanged(
   184     TDrawNow aDrawNow )
   184     TDrawNow aDrawNow )
   185     {
   185     {
   186     iBrCtlInterface->SetFocus( IsFocused() );
   186     iBrCtlInterface->SetFocus( IsFocused() );
   187     CCoeControl::FocusChanged( aDrawNow );
   187     CCoeControl::FocusChanged( aDrawNow );
   188     }
   188     }