Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: Source/core/html/forms/PasswordInputType.h

Issue 27746003: Have InputType factories take an HTMLInputElement reference in parameter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 20 matching lines...) Expand all
31 #ifndef PasswordInputType_h 31 #ifndef PasswordInputType_h
32 #define PasswordInputType_h 32 #define PasswordInputType_h
33 33
34 #include "core/html/forms/BaseTextInputType.h" 34 #include "core/html/forms/BaseTextInputType.h"
35 #include "core/html/shadow/PasswordGeneratorButtonElement.h" 35 #include "core/html/shadow/PasswordGeneratorButtonElement.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 class PasswordInputType FINAL : public BaseTextInputType { 39 class PasswordInputType FINAL : public BaseTextInputType {
40 public: 40 public:
41 static PassRefPtr<InputType> create(HTMLInputElement*); 41 static PassRefPtr<InputType> create(HTMLInputElement&);
42 42
43 private: 43 private:
44 PasswordInputType(HTMLInputElement* element) : BaseTextInputType(element) { } 44 PasswordInputType(HTMLInputElement& element) : BaseTextInputType(element) { }
45 virtual HTMLElement* passwordGeneratorButtonElement() const OVERRIDE; 45 virtual HTMLElement* passwordGeneratorButtonElement() const OVERRIDE;
46 virtual bool needsContainer() const OVERRIDE; 46 virtual bool needsContainer() const OVERRIDE;
47 virtual void createShadowSubtree() OVERRIDE; 47 virtual void createShadowSubtree() OVERRIDE;
48 virtual void destroyShadowSubtree() OVERRIDE; 48 virtual void destroyShadowSubtree() OVERRIDE;
49 virtual const AtomicString& formControlType() const OVERRIDE; 49 virtual const AtomicString& formControlType() const OVERRIDE;
50 virtual bool shouldSaveAndRestoreFormControlState() const OVERRIDE; 50 virtual bool shouldSaveAndRestoreFormControlState() const OVERRIDE;
51 virtual FormControlState saveFormControlState() const OVERRIDE; 51 virtual FormControlState saveFormControlState() const OVERRIDE;
52 virtual void restoreFormControlState(const FormControlState&) OVERRIDE; 52 virtual void restoreFormControlState(const FormControlState&) OVERRIDE;
53 virtual bool shouldUseInputMethod() const OVERRIDE; 53 virtual bool shouldUseInputMethod() const OVERRIDE;
54 virtual bool shouldResetOnDocumentActivation() OVERRIDE; 54 virtual bool shouldResetOnDocumentActivation() OVERRIDE;
55 virtual bool shouldRespectListAttribute() OVERRIDE; 55 virtual bool shouldRespectListAttribute() OVERRIDE;
56 virtual bool shouldRespectSpeechAttribute() OVERRIDE; 56 virtual bool shouldRespectSpeechAttribute() OVERRIDE;
57 virtual bool isPasswordField() const OVERRIDE; 57 virtual bool isPasswordField() const OVERRIDE;
58 virtual void enableSecureTextInput() OVERRIDE; 58 virtual void enableSecureTextInput() OVERRIDE;
59 virtual void disableSecureTextInput() OVERRIDE; 59 virtual void disableSecureTextInput() OVERRIDE;
60 60
61 bool isPasswordGenerationEnabled() const; 61 bool isPasswordGenerationEnabled() const;
62 // For testing. 62 // For testing.
63 bool isPasswordGenerationDecorationEnabled() const; 63 bool isPasswordGenerationDecorationEnabled() const;
64 64
65 RefPtr<PasswordGeneratorButtonElement> m_generatorButton; 65 RefPtr<PasswordGeneratorButtonElement> m_generatorButton;
66 }; 66 };
67 67
68 } // namespace WebCore 68 } // namespace WebCore
69 69
70 #endif // PasswordInputType_h 70 #endif // PasswordInputType_h
OLDNEW
« no previous file with comments | « Source/core/html/forms/NumberInputType.cpp ('k') | Source/core/html/forms/PasswordInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698