Changeset 21033 for S60/trunk/WebKit

Show
Ignore:
Timestamp:
04/23/07 06:33:54 (21 months ago)
Author:
yongjzha
Message:

winship, reviewed by Yongjun

DESC: move DialogMimeFileSelectLC from DialogProvider API to MWidgetCallBack
http://bugs.webkit.org/show_bug.cgi?id=13406

  • BrowserControl/inc/BrCtl.h:
  • BrowserControl/inc/BrCtlDefs.h: (TBrCtlDefs::):
  • BrowserControl/inc/BrCtlDialogsProvider.h: (TBrCtlSelectOptionData::TBrCtlSelectOptionData): (TBrCtlImageCarrier::TBrCtlImageCarrier):
  • BrowserControl/inc/BrCtlInterface.h:
  • BrowserControl/src/BrCtl.cpp: (CBrCtl::~CBrCtl): (CBrCtl::HandleCommandL): (CBrCtl::CreateWidgetExtensionL):
  • BrowserCore/Formcontrols/inc/FControlFileInputSkin.h:
  • BrowserCore/Formcontrols/src/FControlFileInputSkin.cpp: (TFileDialogWrapper::DialogMimeFileSelectLC): (CFormFileInputSkin::SetAcceptedMimeType): (CFormFileInputSkin::ActivateL):
  • BrowserView/inc/WidgetExtension.h:
  • group/BWINSCW/WebKit_30U.def:
  • group/EABI/browserengineU.def:
  • group/formcontrols.mmpi:
Location:
S60/trunk/WebKit
Files:
12 modified

Legend:

Unmodified
Added
Removed
  • S60/trunk/WebKit/BrowserControl/inc/BrCtl.h

    r20911 r21033  
    651651        IMPORT_C TBrCtlDefs::TBrCtlFindResponse FindKeywordAgain( TBool aFowardDirection ); 
    652652 
    653 #ifdef  RD_BROWSER_WIDGETS 
    654653        /** 
    655654        * Creates the widget extension object 
     
    658657        */ 
    659658        IMPORT_C MWidgetExtension* CreateWidgetExtensionL(MWidgetCallback& aWidgetCallback) ; 
    660 #endif //RD_BROWSER_WIDGETS 
    661659 
    662660        /** 
  • S60/trunk/WebKit/BrowserControl/inc/BrCtlDefs.h

    r18891 r21033  
    723723        EClientCommandShowContextMenu 
    724724        }; 
    725 #ifdef  RD_BROWSER_WIDGETS 
     725 
    726726    /** 
    727727    * The widget params. 
     
    733733        EWidgetBasePath 
    734734        }; 
    735 #endif //RD_BROWSER_WIDGETS 
    736735    }; 
    737736 
  • S60/trunk/WebKit/BrowserControl/inc/BrCtlDialogsProvider.h

    r20538 r21033  
    99*    Copyright (c) 2006, Nokia Corporation 
    1010*    All rights reserved. 
    11 *   
     11* 
    1212*   Redistribution and use in source and binary forms, with or without 
    1313*   modification, are permitted provided that the following conditions 
    1414*   are met: 
    15 *   
     15* 
    1616*      * Redistributions of source code must retain the above copyright 
    1717*        notice, this list of conditions and the following disclaimer. 
     
    2323*        contributors may be used to endorse or promote products derived 
    2424*        from this software without specific prior written permission. 
    25 *   
     25* 
    2626*   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    2727*   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     
    3636*   USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
    3737*   DAMAGE. 
    38 *   
     38* 
    3939*    Please see file patentlicense.txt for further grants. 
    4040* ============================================================================== 
     
    5858    ESelectTypeNone,      ///< Single select - Do not display any button 
    5959    /** 
    60     * No buttons (single selection only)  
    61     * OK softkey is available  
     60    * No buttons (single selection only) 
     61    * OK softkey is available 
    6262    * Cancel button is not available 
    6363    */ 
    64     ESelectTypeOkOnly      
     64    ESelectTypeOkOnly 
    6565    }; 
    6666 
    6767/** 
    68 * Defines the type of image if it cannot be recognized by the  
     68* Defines the type of image if it cannot be recognized by the 
    6969* Symbian image conversion library. 
    7070*/ 
     
    8484 
    8585/** 
    86 * The MBrDialogsProvider class provides functions implemented by  
    87 * the Browser Control to display dialogs, such as error notifications,  
    88 * authentication requests, and selection lists.  
     86* The MBrDialogsProvider class provides functions implemented by 
     87* the Browser Control to display dialogs, such as error notifications, 
     88* authentication requests, and selection lists. 
    8989* 
    9090* Usage: 
     
    9393*  #include <BrCtlDialogsProvider.h> 
    9494* 
    95 *   
     95* 
    9696* @see S60 Platform: Browser Control API Developer's Guide Version 2.0 
    9797* @lib BrowserEngine.lib 
     
    102102    { 
    103103    public: // New functions 
    104          
    105         /** 
    106         * Notifies the user of an error encountered during a download.  
     104 
     105        /** 
     106        * Notifies the user of an error encountered during a download. 
    107107        * Some examples are: insufficient memory, unrecognized URL, and DNS not found. 
    108108        * @since 2.8 
     
    113113 
    114114        /** 
    115         * Notifies the user of an error from the HTTP server  
     115        * Notifies the user of an error from the HTTP server 
    116116        * during a download. Some examples are: file not found, redirect error. 
    117117        * @since 2.8 
     
    123123 
    124124        /** 
    125         * Navigates through your file system and selects a file;  
     125        * Navigates through your file system and selects a file; 
    126126        * analogous to the Browse command in Windows. 
    127127        * @since 2.8 
     
    144144        * Values: One of the following: 
    145145        * Check boxes (multiple selections allowed) 
    146         * Radio buttons (single selection only). For example, highlight a URL listed  
     146        * Radio buttons (single selection only). For example, highlight a URL listed 
    147147        *   in the session History. 
    148148        *   No buttons (single selection only) 
    149149        * No buttons (single selection only), OK softkey available 
    150         * For example, if you are about to download a plug-in, you can choose  
    151         * to display the content in the Web page or in a viewer application.  
     150        * For example, if you are about to download a plug-in, you can choose 
     151        * to display the content in the Web page or in a viewer application. 
    152152        * @param aOptions A list of options to display 
    153153        * @return EFalse if the user canceled the dialog selection 
    154154        * ETrue if the user selected an option. 
    155155        */ 
    156         virtual TBool DialogSelectOptionL(const TDesC& aTitle,  
    157                                           TBrCtlSelectOptionType aBrCtlSelectOptionType,  
     156        virtual TBool DialogSelectOptionL(const TDesC& aTitle, 
     157                                          TBrCtlSelectOptionType aBrCtlSelectOptionType, 
    158158                                          CArrayFix<TBrCtlSelectOptionData>& aOptions) = 0; 
    159159 
    160160        /** 
    161         * User Authentication dialog.  
     161        * User Authentication dialog. 
    162162        * @since 2.8 
    163163        * @param aUrl The url requiring authentication 
     
    167167        * @param aReturnedPasswd The password entered by the user 
    168168        * @param aBasicAuthentication ETrue if basic authentication is required. 
    169         * EFalse if another type of authentication is required; for example, Digest.  
     169        * EFalse if another type of authentication is required; for example, Digest. 
    170170        * Default: EFalse 
    171171        * @return EFalse if the user cancelled the selection 
     
    173173        @ attiontion User name and password are returned on cleanup stack. 
    174174        */ 
    175         virtual TBool DialogUserAuthenticationLC(const TDesC& aUrl,  
    176                                                  const TDesC& aRealm,  
    177                                                  const TDesC& aDefaultUserName,  
    178                                                  HBufC*& aReturnedUserName,  
     175        virtual TBool DialogUserAuthenticationLC(const TDesC& aUrl, 
     176                                                 const TDesC& aRealm, 
     177                                                 const TDesC& aDefaultUserName, 
     178                                                 HBufC*& aReturnedUserName, 
    179179                                                 HBufC*& aReturnedPasswd, 
    180180                                                 TBool aBasicAuthentication = EFalse) = 0; 
    181181 
    182182        /** 
    183         * Displays a message to the user.  
    184         * For example, the message may inform the user  
     183        * Displays a message to the user. 
     184        * For example, the message may inform the user 
    185185        * about an error encountered while processing a request. 
    186186        * @since 2.8 
     
    190190        * The message disappears after a time out. 
    191191        */ 
    192         virtual void DialogNoteL(const TDesC& aMessage) = 0;  
     192        virtual void DialogNoteL(const TDesC& aMessage) = 0; 
    193193 
    194194        /** 
     
    201201        * The message displays until the user presses OK. 
    202202        */ 
    203         virtual void DialogAlertL(const TDesC& aTitle, const TDesC& aMessage) = 0;  
     203        virtual void DialogAlertL(const TDesC& aTitle, const TDesC& aMessage) = 0; 
    204204 
    205205        /** 
     
    225225        * @param aMessage The message to display 
    226226        * @param aDefaultInput The default input if available 
    227         * @param aReturnedInput The input entered by the user.  
     227        * @param aReturnedInput The input entered by the user. 
    228228        * @return EFalse if the user cancelled the selection 
    229229        * ETrue if the user selected an option. 
     
    236236 
    237237        /** 
    238         * Displays information about the Netscape plug-in object and  
     238        * Displays information about the Netscape plug-in object and 
    239239        * requests confirmation before downloading the object. 
    240240        * @since 2.8 
     
    244244        * Size 
    245245        * Flag to indicate whether a viewer application exists for this content 
    246         * Flag to indicate whether a Netscape plug-in exists that supports this content  
     246        * Flag to indicate whether a Netscape plug-in exists that supports this content 
    247247        * Name of the application or Netscape plug-in with which the content can 
    248         * be viewed on the mobile phone  
     248        * be viewed on the mobile phone 
    249249        * @return EFalse if the user cancelled the selection 
    250250        * ETrue if the user selected an option. 
     
    255255        * Display the images that appear in the current page 
    256256        * @since 2.8 
    257         * @param aPageImages Array describing the images that appear in the current page.  
     257        * @param aPageImages Array describing the images that appear in the current page. 
    258258        * The array contains the following elements for each image: 
    259259        * Image data 
     
    261261        * Title for the image 
    262262        * Image type 
    263         * If the image type is WBMP or OTA, it must be specified.  
    264         * Symbian can detect any other image type.  
     263        * If the image type is WBMP or OTA, it must be specified. 
     264        * Symbian can detect any other image type. 
    265265        * @return void 
    266266        */ 
     
    273273        */ 
    274274        virtual void CancelAll() = 0; 
    275          
     275 
    276276        /** 
    277277        * Displays a dialog for searching on the page. 
     
    279279        * @return void 
    280280        */ 
    281        virtual void DialogFindL() = 0;  
    282         
    283         /** 
    284         * Navigates through your file system and selects a file of specific mime type;  
    285         * analogous to the Browse command in Windows. 
    286         * @since 3.2 
    287         * @param aSelectedFileName The selected file name. 
    288         * @param aMimeType The accepted mime type. 
    289         * @return ETrue if the user selected a file 
    290         * EFalse if the user cancelled the transaction and did not select a file. 
    291         * @attiontion Returned on cleanup stack. Browser control will free the buffer. 
    292         */ 
    293         virtual TBool DialogMimeFileSelectLC(HBufC*& aSelectedFileName, 
    294                                          const TDesC& aMimeType) = 0; 
    295         
     281       virtual void DialogFindL() = 0; 
     282 
    296283    }; 
    297284 
    298285 
    299286/** 
    300 * The TBrCtlSelectOptionData class represents a list of elements  
     287* The TBrCtlSelectOptionData class represents a list of elements 
    301288* to display in the list box. This class is used for the List Selection Dialog. 
    302289* @code 
     
    316303        */ 
    317304        inline TBrCtlSelectOptionData() 
    318                 {    
     305                { 
    319306                iText.Set(NULL, 0); 
    320307                iIsSelected = EFalse; 
     
    332319        * @return TbrCtlSelectOptionData object 
    333320        */ 
    334         inline TBrCtlSelectOptionData( const TDesC& aText,  
     321        inline TBrCtlSelectOptionData( const TDesC& aText, 
    335322                                        TBool aIsSelected, 
    336                                         TBool aIsOptGroup,  
     323                                        TBool aIsOptGroup, 
    337324                                        TBool aHasOnPick ) 
    338325                                                            { 
     
    340327                                                            iIsSelected = aIsSelected; 
    341328                                                            iIsOptGroup = aIsOptGroup; 
    342                                                             iHasOnPick = aHasOnPick;  
     329                                                            iHasOnPick = aHasOnPick; 
    343330                                                            } 
    344331        /** 
    345332        * Gets the display text associated with a specified option. 
    346333        * @since 2.8 
    347         * @return A reference to a Symbian TDesC object that  
    348         * contains the text associated with this option.  
     334        * @return A reference to a Symbian TDesC object that 
     335        * contains the text associated with this option. 
    349336        */ 
    350337        inline const TDesC& Text() const {return iText;} 
    351338        /** 
    352         * Indicates whether or not an option is selected.  
     339        * Indicates whether or not an option is selected. 
    353340        * @since 2.8 
    354341        * @return ETrue if the option is selected 
     
    357344        inline TBool IsSelected() const {return iIsSelected;} 
    358345        /** 
    359         * Indicates whether an option group member  
    360         * variable is a group title or a selectable option.  
     346        * Indicates whether an option group member 
     347        * variable is a group title or a selectable option. 
    361348        * @since 2.8 
    362349        * @return ETrue if the listed item is the title of an option group 
    363         * EFalse if the listed item is one of the options from which to select  
     350        * EFalse if the listed item is one of the options from which to select 
    364351        */ 
    365352        inline TBool IsOptGroup() const {return iIsOptGroup;} 
    366353        /** 
    367         * Indicates whether or not the dialog closes when an option is selected.  
    368         * @since 2.8 
    369         * @return ETrue if the dialog closes when the element is selected.  
     354        * Indicates whether or not the dialog closes when an option is selected. 
     355        * @since 2.8 
     356        * @return ETrue if the dialog closes when the element is selected. 
    370357        * This is known as having OnPick capability. 
    371358        * EFalse if the dialog does not close when the element is selected 
     
    373360        inline TBool HasOnPick() const {return iHasOnPick;} 
    374361        /** 
    375         * Sets the text of the option object.  
    376         * @since 2.8 
    377         * @param aText A reference to a TDesC object that contains the  
     362        * Sets the text of the option object. 
     363        * @since 2.8 
     364        * @param aText A reference to a TDesC object that contains the 
    378365        * text to associate with a particular option. 
    379366        * @return None 
     
    382369        inline void SetText( TDesC& aText )             { iText.Set( aText ); } 
    383370        /** 
    384         * Sets the selection state of an option.  
     371        * Sets the selection state of an option. 
    385372        * @since 2.8 
    386373        * @param aIsSelected The state of the IsSelected member variable. 
     
    388375        * ETrue if the option is selected 
    389376        * EFalse if the option is not selected 
    390         * @return None  
     377        * @return None 
    391378        */ 
    392379        inline void SetIsSelected( TBool aIsSelected )  { iIsSelected = aIsSelected; } 
    393380        /** 
    394         * Sets the state of the option group member variable.  
    395         * Indicates whether an option group member variable is a group title  
     381        * Sets the state of the option group member variable. 
     382        * Indicates whether an option group member variable is a group title 
    396383        * or a selectable option. 
    397384        * @since 2.8 
    398         * @param aIsOptGroup The state of the option group.  
     385        * @param aIsOptGroup The state of the option group. 
    399386        * Value: 
    400387        * ETrue if the listed item is the title of an option group. 
     
    404391        inline void SetIsOptGroup( TBool aIsOptGroup )  { iIsOptGroup = aIsOptGroup; } 
    405392        /** 
    406         * Sets the state of the hasOnPick member variable.  
     393        * Sets the state of the hasOnPick member variable. 
    407394        * Indicates whether or not the dialog closes when an option is selected. 
    408395        * @since 2.8 
    409         * @param aHasOnPick  
    410         * ETrue if the dialog closes when the element is selected. This  
     396        * @param aHasOnPick 
     397        * ETrue if the dialog closes when the element is selected. This 
    411398        * is known as having OnPick capability. 
    412399        * EFalse if the dialog does not close when the element is selected 
     
    423410        TBool iIsOptGroup; 
    424411        // Flag if the element has onPick 
    425         TBool iHasOnPick;  
     412        TBool iHasOnPick; 
    426413    }; 
    427414 
     
    444431        */ 
    445432        CBrCtlObjectInfo(); 
    446      
     433 
    447434        /** 
    448435        * Constructor 
     
    468455        inline void SetAppSupported(TBool aAppSupported) {iAppSupported = aAppSupported;} 
    469456        /** 
    470         * Sets the flag if there is a netscape plugin for this object  
     457        * Sets the flag if there is a netscape plugin for this object 
    471458        * @since 3.0 
    472459        * @param aPluginSupported ETrue if there is a netscape plugin for this object 
     
    485472        * Sets the name of the viewer app or netscape plugin that supports this object 
    486473        * @since 3.0 
    487         * @param aAppName  Symbian descriptor containing the name of  
     474        * @param aAppName  Symbian descriptor containing the name of 
    488475        * the viewer app or netscape plugin that supports this object. 
    489476        * @return None 
     
    491478    inline void SetAppName(const TDesC& aAppName) {iAppName.Set(aAppName);} 
    492479        /** 
    493         * Sets the content type of the object  
    494         * @since 3.0 
    495         * @param aFileType Symbian descriptor holding content type of the object  
     480        * Sets the content type of the object 
     481        * @since 3.0 
     482        * @param aFileType Symbian descriptor holding content type of the object 
    496483        * @return None 
    497484        */ 
     
    506493        inline TBool AppSupported() {return iAppSupported;} 
    507494        /** 
    508         * Tells if there is a netscape plugin for this object  
     495        * Tells if there is a netscape plugin for this object 
    509496        * @since 3.0 
    510497        * @param None 
    511498        * @return ETrue if there is a netscape plugin for this object 
    512         * EFalse if there is not a netscape plugin for this object.        
     499        * EFalse if there is not a netscape plugin for this object. 
    513500        */ 
    514501        inline TBool PluginSupported() {return iPluginSupported;} 
     
    517504        * @since 3.0 
    518505        * @param None 
    519         * @return Symbian descriptor containing the size of the object  
     506        * @return Symbian descriptor containing the size of the object 
    520507        */ 
    521508        inline const TDesC& Size() const {return iSize;} 
     
    524511        * @since 3.0 
    525512        * @param None 
    526         * @return Symbian descriptor containing the name of  
     513        * @return Symbian descriptor containing the name of 
    527514        * the viewer app or netscape plugin that supports this object. 
    528515        */ 
    529516    inline const TDesC& AppName() const {return iAppName;} 
    530517        /** 
    531         * Gets the content type of the object  
    532         * @since 3.0 
    533         * @param None 
    534         * @return Symbian descriptor holding content type of the object  
     518        * Gets the content type of the object 
     519        * @since 3.0 
     520        * @param None 
     521        * @return Symbian descriptor holding content type of the object 
    535522        */ 
    536523    inline const TDesC& FileType() const {return iFileType;} 
     
    568555        * @param aAltText The alt text of the image 
    569556        * @param aImageType The type of the image 
    570         */        
     557        */ 
    571558        TBrCtlImageCarrier(const TDesC8& aRawData, const TDesC& aUrl, 
    572             const TDesC& aAltText, TBrCtlImageType aImageType, const TDesC& aContentType ) :  
     559            const TDesC& aAltText, TBrCtlImageType aImageType, const TDesC& aContentType ) : 
    573560            iRawData( aRawData ), 
    574561            iUrl( aUrl ), 
     
    589576        * @since 3.0 
    590577        * @param None 
    591         * @return Symbian descriptor containing url of the image  
     578        * @return Symbian descriptor containing url of the image 
    592579        */ 
    593580        inline const TDesC& Url() const {return iUrl;} 
     
    596583        * @since 3.0 
    597584        * @param None 
    598         * @return Symbian descriptor containing alt text of the image  
     585        * @return Symbian descriptor containing alt text of the image 
    599586        */ 
    600587        inline const TDesC& AltText() const {return iAltText;} 
     
    610597        * @since 3.1 
    611598        * @param None 
    612         * @return Symbian descriptor containing content type of the image  
     599        * @return Symbian descriptor containing content type of the image 
    613600        */ 
    614601        inline const TDesC& ContentType() const {return iContentType;} 
    615     private:      
     602    private: 
    616603        TPtrC8 iRawData; 
    617604        TPtrC iUrl; 
     
    622609 
    623610 
    624 #endif      // BRCTLDIALOGSPROVIDER_H    
    625              
     611#endif      // BRCTLDIALOGSPROVIDER_H 
     612 
    626613// End of File 
  • S60/trunk/WebKit/BrowserControl/inc/BrCtlInterface.h

    r18891 r21033  
    7272class MBrCtlStateChangeObserver; 
    7373class MBrCtlCommandObserver; 
    74 #ifdef  RD_BROWSER_WIDGETS 
    7574class MWidgetCallback; 
    7675class MWidgetExtension; 
    77 #endif //RD_BROWSER_WIDGETS 
    7876class CBrCtlInterface; 
    7977class CPluginInfo; 
     
    600598        IMPORT_C virtual void RemoveCommandObserver(MBrCtlCommandObserver* aBrCtlCommandObserver) = 0;