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

Side by Side Diff: Source/core/html/FormController.h

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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
« no previous file with comments | « Source/core/html/FileInputType.cpp ('k') | Source/core/html/FormController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 WTF_MAKE_FAST_ALLOCATED; 77 WTF_MAKE_FAST_ALLOCATED;
78 public: 78 public:
79 static PassOwnPtr<FormController> create() 79 static PassOwnPtr<FormController> create()
80 { 80 {
81 return adoptPtr(new FormController); 81 return adoptPtr(new FormController);
82 } 82 }
83 ~FormController(); 83 ~FormController();
84 84
85 CheckedRadioButtons& checkedRadioButtons() { return m_checkedRadioButtons; } 85 CheckedRadioButtons& checkedRadioButtons() { return m_checkedRadioButtons; }
86 86
87 void registerFormElementWithState(HTMLFormControlElementWithState* control) { m_formElementsWithState.add(control); } 87 void registerFormElementWithState(Handle<HTMLFormControlElementWithState> co ntrol) { m_formElementsWithState.add(control.raw()); }
88 void unregisterFormElementWithState(HTMLFormControlElementWithState* control ) { m_formElementsWithState.remove(control); } 88 void unregisterFormElementWithState(Handle<HTMLFormControlElementWithState> control) { m_formElementsWithState.remove(control.raw()); }
89 // This should be callled only by Document::formElementsState(). 89 // This should be callled only by Document::formElementsState().
90 Vector<String> formElementsState() const; 90 Vector<String> formElementsState() const;
91 // This should be callled only by Document::setStateForNewFormElements(). 91 // This should be callled only by Document::setStateForNewFormElements().
92 void setStateForNewFormElements(const Vector<String>&); 92 void setStateForNewFormElements(const Vector<String>&);
93 void willDeleteForm(HTMLFormElement*); 93 void willDeleteForm(HTMLFormElement*);
94 void restoreControlStateFor(HTMLFormControlElementWithState&); 94 void restoreControlStateFor(Handle<HTMLFormControlElementWithState>);
95 void restoreControlStateIn(HTMLFormElement&); 95 void restoreControlStateIn(HTMLFormElement&);
96 96
97 static Vector<String> getReferencedFilePaths(const Vector<String>& stateVect or); 97 static Vector<String> getReferencedFilePaths(const Vector<String>& stateVect or);
98 98
99 void clearWeakPointers(Visitor*); 99 void clearWeakPointers(Visitor*);
100 100
101 private: 101 private:
102 // FIXME(oilpan): This should be a weak hash set.
102 typedef ListHashSet<HTMLFormControlElementWithState*, 64> FormElementListHas hSet; 103 typedef ListHashSet<HTMLFormControlElementWithState*, 64> FormElementListHas hSet;
103 typedef HashMap<RefPtr<AtomicStringImpl>, OwnPtr<SavedFormState> > SavedForm StateMap; 104 typedef HashMap<RefPtr<AtomicStringImpl>, OwnPtr<SavedFormState> > SavedForm StateMap;
104 105
105 FormController(); 106 FormController();
106 static PassOwnPtr<SavedFormStateMap> createSavedFormStateMap(const FormEleme ntListHashSet&); 107 static PassOwnPtr<SavedFormStateMap> createSavedFormStateMap(const FormEleme ntListHashSet&);
107 FormControlState takeStateForFormElement(const HTMLFormControlElementWithSta te&); 108 FormControlState takeStateForFormElement(Handle<const HTMLFormControlElement WithState>);
108 static void formStatesFromStateVector(const Vector<String>&, SavedFormStateM ap&); 109 static void formStatesFromStateVector(const Vector<String>&, SavedFormStateM ap&);
109 110
110 CheckedRadioButtons m_checkedRadioButtons; 111 CheckedRadioButtons m_checkedRadioButtons;
111 FormElementListHashSet m_formElementsWithState; 112 FormElementListHashSet m_formElementsWithState;
112 SavedFormStateMap m_savedFormStateMap; 113 SavedFormStateMap m_savedFormStateMap;
113 OwnPtr<FormKeyGenerator> m_formKeyGenerator; 114 OwnPtr<FormKeyGenerator> m_formKeyGenerator;
114 }; 115 };
115 116
116 } // namespace WebCore 117 } // namespace WebCore
117 #endif 118 #endif
OLDNEW
« no previous file with comments | « Source/core/html/FileInputType.cpp ('k') | Source/core/html/FormController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698