| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_GLUE_EDITOR_CLIENT_IMPL_H__ | 5 #ifndef WEBKIT_GLUE_EDITOR_CLIENT_IMPL_H__ |
| 6 #define WEBKIT_GLUE_EDITOR_CLIENT_IMPL_H__ | 6 #define WEBKIT_GLUE_EDITOR_CLIENT_IMPL_H__ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 | 10 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 protected: | 128 protected: |
| 129 WebViewImpl* web_view_; | 129 WebViewImpl* web_view_; |
| 130 bool use_editor_delegate_; | 130 bool use_editor_delegate_; |
| 131 bool in_redo_; | 131 bool in_redo_; |
| 132 | 132 |
| 133 typedef std::deque<WTF::RefPtr<WebCore::EditCommand> > EditCommandStack; | 133 typedef std::deque<WTF::RefPtr<WebCore::EditCommand> > EditCommandStack; |
| 134 EditCommandStack undo_stack_; | 134 EditCommandStack undo_stack_; |
| 135 EditCommandStack redo_stack_; | 135 EditCommandStack redo_stack_; |
| 136 | 136 |
| 137 private: | 137 private: |
| 138 // Returns whether or not the focused control needs spell-checking. |
| 139 // Currently, this function just retrieves the focused node and determines |
| 140 // whether or not it is a <textarea> element or an element whose |
| 141 // contenteditable attribute is true. |
| 142 // TODO(hbono): Bug 740540: This code just implements the default behavior |
| 143 // proposed in this issue. We should also retrieve "spellcheck" attributes |
| 144 // for text fields and create a flag to over-write the default behavior. |
| 145 bool ShouldSpellcheckByDefault(); |
| 146 |
| 138 // Whether the last entered key was a backspace. | 147 // Whether the last entered key was a backspace. |
| 139 bool backspace_pressed_; | 148 bool backspace_pressed_; |
| 140 | 149 |
| 150 // This flag is set to false if spell check for this editor is manually |
| 151 // turned off. The default setting is SPELLCHECK_AUTOMATIC. |
| 152 enum { |
| 153 SPELLCHECK_AUTOMATIC, |
| 154 SPELLCHECK_FORCED_ON, |
| 155 SPELLCHECK_FORCED_OFF |
| 156 }; |
| 157 int spell_check_this_field_status_; |
| 158 |
| 141 // The method factory used to post autofill related tasks. | 159 // The method factory used to post autofill related tasks. |
| 142 ScopedRunnableMethodFactory<EditorClientImpl> autofill_factory_; | 160 ScopedRunnableMethodFactory<EditorClientImpl> autofill_factory_; |
| 143 }; | 161 }; |
| 144 | 162 |
| 145 #endif // WEBKIT_GLUE_EDITOR_CLIENT_IMPL_H__ | 163 #endif // WEBKIT_GLUE_EDITOR_CLIENT_IMPL_H__ |
| 146 | 164 |
| OLD | NEW |