OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 ~SpellCheckerClientImpl() override; | 46 ~SpellCheckerClientImpl() override; |
47 | 47 |
48 bool isContinuousSpellCheckingEnabled() override; | 48 bool isContinuousSpellCheckingEnabled() override; |
49 void toggleContinuousSpellChecking() override; | 49 void toggleContinuousSpellChecking() override; |
50 void checkSpellingOfString(const String&, int* misspellingLocation, int* mis
spellingLength) override; | 50 void checkSpellingOfString(const String&, int* misspellingLocation, int* mis
spellingLength) override; |
51 void checkGrammarOfString(const String&, Vector<GrammarDetail>&, | 51 void checkGrammarOfString(const String&, Vector<GrammarDetail>&, |
52 int* badGrammarLocation, int* badGrammarLength) override; | 52 int* badGrammarLocation, int* badGrammarLength) override; |
53 void updateSpellingUIWithMisspelledWord(const String&) override; | 53 void updateSpellingUIWithMisspelledWord(const String&) override; |
54 void showSpellingUI(bool show) override; | 54 void showSpellingUI(bool show) override; |
55 bool spellingUIIsShowing() override; | 55 bool spellingUIIsShowing() override; |
56 void requestCheckingOfString(RawPtr<TextCheckingRequest>) override; | 56 void requestCheckingOfString(TextCheckingRequest*) override; |
57 | 57 |
58 TextCheckerClient& textChecker() override { return *this; } | 58 TextCheckerClient& textChecker() override { return *this; } |
59 | 59 |
60 private: | 60 private: |
61 // Returns whether or not the focused control needs spell-checking. | 61 // Returns whether or not the focused control needs spell-checking. |
62 // Currently, this function just retrieves the focused node and determines | 62 // Currently, this function just retrieves the focused node and determines |
63 // whether or not it is a <textarea> element or an element whose | 63 // whether or not it is a <textarea> element or an element whose |
64 // contenteditable attribute is true. | 64 // contenteditable attribute is true. |
65 // FIXME: Bug 740540: This code just implements the default behavior | 65 // FIXME: Bug 740540: This code just implements the default behavior |
66 // proposed in this issue. We should also retrieve "spellcheck" attributes | 66 // proposed in this issue. We should also retrieve "spellcheck" attributes |
67 // for text fields and create a flag to over-write the default behavior. | 67 // for text fields and create a flag to over-write the default behavior. |
68 bool shouldSpellcheckByDefault(); | 68 bool shouldSpellcheckByDefault(); |
69 | 69 |
70 WebViewImpl* m_webView; | 70 WebViewImpl* m_webView; |
71 | 71 |
72 // This flag is set to false if spell check for this editor is manually | 72 // This flag is set to false if spell check for this editor is manually |
73 // turned off. The default setting is SpellCheckAutomatic. | 73 // turned off. The default setting is SpellCheckAutomatic. |
74 enum { | 74 enum { |
75 SpellCheckAutomatic, | 75 SpellCheckAutomatic, |
76 SpellCheckForcedOn, | 76 SpellCheckForcedOn, |
77 SpellCheckForcedOff | 77 SpellCheckForcedOff |
78 } m_spellCheckThisFieldStatus; | 78 } m_spellCheckThisFieldStatus; |
79 }; | 79 }; |
80 | 80 |
81 } // namespace blink | 81 } // namespace blink |
82 | 82 |
83 #endif | 83 #endif |
OLD | NEW |