OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #ifndef SpellCheckerClient_h | 27 #ifndef SpellCheckerClient_h |
28 #define SpellCheckerClient_h | 28 #define SpellCheckerClient_h |
29 | 29 |
30 #include "wtf/Forward.h" | 30 #include "wtf/Forward.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class TextCheckerClient; | 34 class TextCheckerClient; |
35 | 35 |
| 36 // TODO(xiaochengh): Split SpellCheckerClient into two classes: |
| 37 // - SpllingUIClient, for spelling UI related functions. |
| 38 // - SpellCheckToggler, for checking and toggling the enabled state. |
36 class SpellCheckerClient { | 39 class SpellCheckerClient { |
37 public: | 40 public: |
38 virtual ~SpellCheckerClient() {} | 41 virtual ~SpellCheckerClient() {} |
39 | 42 |
40 virtual bool isSpellCheckingEnabled() = 0; | 43 virtual bool isSpellCheckingEnabled() = 0; |
41 virtual void toggleSpellCheckingEnabled() = 0; | 44 virtual void toggleSpellCheckingEnabled() = 0; |
42 | 45 |
43 virtual TextCheckerClient& textChecker() = 0; | 46 virtual TextCheckerClient& textChecker() = 0; |
44 | 47 |
45 virtual void updateSpellingUIWithMisspelledWord(const WTF::String&) = 0; | 48 virtual void updateSpellingUIWithMisspelledWord(const WTF::String&) = 0; |
46 virtual void showSpellingUI(bool show) = 0; | 49 virtual void showSpellingUI(bool show) = 0; |
47 virtual bool spellingUIIsShowing() = 0; | 50 virtual bool spellingUIIsShowing() = 0; |
48 }; | 51 }; |
49 | 52 |
50 } // namespace blink | 53 } // namespace blink |
51 | 54 |
52 #endif // SpellCheckerClient_h | 55 #endif // SpellCheckerClient_h |
OLD | NEW |