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

Side by Side Diff: third_party/WebKit/Source/web/SpellCheckerClientImpl.h

Issue 2848513002: Introduce the abstract class WebViewBase, to decouple WebViewImpl. (Closed)
Patch Set: Fix typo. Created 3 years, 7 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
OLDNEW
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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef SpellCheckerClientImpl_h 31 #ifndef SpellCheckerClientImpl_h
32 #define SpellCheckerClientImpl_h 32 #define SpellCheckerClientImpl_h
33 33
34 #include "core/page/SpellCheckerClient.h" 34 #include "core/page/SpellCheckerClient.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class WebViewImpl; 38 class WebViewBase;
39 39
40 // TODO(xiaochengh): Split SpellCheckerClientImpl into two classes according to 40 // TODO(xiaochengh): Split SpellCheckerClientImpl into two classes according to
41 // the split that should be done to its interface. 41 // the split that should be done to its interface.
42 class SpellCheckerClientImpl final : public SpellCheckerClient { 42 class SpellCheckerClientImpl final : public SpellCheckerClient {
43 public: 43 public:
44 explicit SpellCheckerClientImpl(WebViewImpl*); 44 explicit SpellCheckerClientImpl(WebViewBase*);
45 45
46 ~SpellCheckerClientImpl() override; 46 ~SpellCheckerClientImpl() override;
47 47
48 bool IsSpellCheckingEnabled() override; 48 bool IsSpellCheckingEnabled() override;
49 void ToggleSpellCheckingEnabled() override; 49 void ToggleSpellCheckingEnabled() override;
50 void UpdateSpellingUIWithMisspelledWord(const String&) override; 50 void UpdateSpellingUIWithMisspelledWord(const String&) override;
51 void ShowSpellingUI(bool show) override; 51 void ShowSpellingUI(bool show) override;
52 bool SpellingUIIsShowing() override; 52 bool SpellingUIIsShowing() override;
53 53
54 private: 54 private:
55 // Returns whether or not the focused control needs spell-checking. 55 // Returns whether or not the focused control needs spell-checking.
56 // Currently, this function just retrieves the focused node and determines 56 // Currently, this function just retrieves the focused node and determines
57 // whether or not it is a <textarea> element or an element whose 57 // whether or not it is a <textarea> element or an element whose
58 // contenteditable attribute is true. 58 // contenteditable attribute is true.
59 // FIXME: Bug 740540: This code just implements the default behavior 59 // FIXME: Bug 740540: This code just implements the default behavior
60 // proposed in this issue. We should also retrieve "spellcheck" attributes 60 // proposed in this issue. We should also retrieve "spellcheck" attributes
61 // for text fields and create a flag to over-write the default behavior. 61 // for text fields and create a flag to over-write the default behavior.
62 bool ShouldSpellcheckByDefault(); 62 bool ShouldSpellcheckByDefault();
63 63
64 WebViewImpl* web_view_; 64 WebViewBase* web_view_;
65 65
66 // This flag is set to false if spell check for this editor is manually 66 // This flag is set to false if spell check for this editor is manually
67 // turned off. The default setting is SpellCheckAutomatic. 67 // turned off. The default setting is SpellCheckAutomatic.
68 enum { 68 enum {
69 kSpellCheckAutomatic, 69 kSpellCheckAutomatic,
70 kSpellCheckForcedOn, 70 kSpellCheckForcedOn,
71 kSpellCheckForcedOff 71 kSpellCheckForcedOff
72 } spell_check_this_field_status_; 72 } spell_check_this_field_status_;
73 }; 73 };
74 74
75 } // namespace blink 75 } // namespace blink
76 76
77 #endif 77 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PrerendererClientImpl.cpp ('k') | third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698