webengine/osswebengine/WebCore/platform/symbian/FormFillController.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __WEBCOREFORMFILLCONTROLLER_H__
       
    20 #define __WEBCOREFORMFILLCONTROLLER_H__
       
    21 
       
    22 #include "Timer.h"
       
    23 #include "PlatformString.h"
       
    24 
       
    25 class MFormFillPopup;
       
    26 class MFormFillCallback;
       
    27 
       
    28 namespace WebCore {
       
    29 
       
    30 class FormDataStore;
       
    31 class FormLoginStore;
       
    32 class HTMLInputElement;
       
    33 class HTMLFormElement;
       
    34 class AtomicString;
       
    35 
       
    36 class FormFillController
       
    37 {
       
    38 public:
       
    39     FormFillController();
       
    40     ~FormFillController();
       
    41 
       
    42     void startSearch();
       
    43     void startSearch(const String& name_, const String& value_);
       
    44     void stopSearch();
       
    45     void setInputElement(MFormFillCallback* callback, HTMLInputElement* input);
       
    46     void clearInputElement();
       
    47 
       
    48     // data store operations
       
    49     void insertInputNameAndValue(const String& name_, const String& value_);
       
    50     HTMLInputElement* inputElement() const              { return m_inputElement; }
       
    51 
       
    52     // password
       
    53     void fillPasswordIfExists(HTMLInputElement* uNode);
       
    54     void saveFormData(HTMLFormElement* form, MFormFillCallback* callback, bool passwdFillEnabled);
       
    55 
       
    56     void enableFormDataFill(bool aEnabled);
       
    57     void enablePasswordFill(bool aEnabled);
       
    58 
       
    59     void clearFormData();
       
    60     void clearLoginData();
       
    61     void updatePopupView();
       
    62     void destroyPopup();
       
    63 
       
    64 private:
       
    65     FormFillController(const FormFillController&);              // not implemented
       
    66     FormFillController& operator=(const FormFillController&);   // not implemented
       
    67 
       
    68     // timer callback
       
    69     void fireSearch(Timer<FormFillController>* timer_);
       
    70 
       
    71     String passwdRealm(const DeprecatedString&);
       
    72     HTMLInputElement* searchPasswordFields(HTMLFormElement*, HTMLInputElement*, int&);
       
    73 
       
    74     MFormFillPopup* m_popup;
       
    75     MFormFillCallback* m_callback;
       
    76     HTMLInputElement* m_inputElement;
       
    77     Timer<FormFillController>* m_searchTimer;
       
    78     FormDataStore* m_formDB;
       
    79     FormLoginStore* m_passwdDB;
       
    80     String m_searchParam;
       
    81     String m_searchValue;
       
    82     Vector<String> m_results;
       
    83 };
       
    84 
       
    85 }
       
    86 
       
    87 #endif //!__WEBCOREFORMFILLCONTROLLER_H__