summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/AlternativeTextClient.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/page/AlternativeTextClient.h')
-rw-r--r--Source/WebCore/page/AlternativeTextClient.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/Source/WebCore/page/AlternativeTextClient.h b/Source/WebCore/page/AlternativeTextClient.h
index a7e991d03..351be76d7 100644
--- a/Source/WebCore/page/AlternativeTextClient.h
+++ b/Source/WebCore/page/AlternativeTextClient.h
@@ -10,10 +10,10 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -23,18 +23,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AlternativeTextClient_h
-#define AlternativeTextClient_h
+#pragma once
#include "FloatRect.h"
#include "TextChecking.h"
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
-#if !PLATFORM(IOS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#if PLATFORM(MAC)
// Some platforms provide UI for suggesting alternative dictation text.
-#define WTF_USE_DICTATION_ALTERNATIVES 1
-#endif // !PLATFORM(IOS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+#define USE_DICTATION_ALTERNATIVES 1
+#endif
namespace WebCore {
@@ -51,9 +50,10 @@ enum AlternativeTextType {
AlternativeTextTypeDictationAlternatives
};
-enum AutocorrectionResponseType {
- AutocorrectionEdited,
- AutocorrectionReverted
+enum class AutocorrectionResponse {
+ Edited,
+ Reverted,
+ Accepted
};
class AlternativeTextClient {
@@ -64,7 +64,7 @@ public:
virtual void showCorrectionAlternative(AlternativeTextType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacmentString, const Vector<String>& alternativeReplacementStrings) = 0;
virtual void dismissAlternative(ReasonForDismissingAlternativeText) = 0;
virtual String dismissAlternativeSoon(ReasonForDismissingAlternativeText) = 0;
- virtual void recordAutocorrectionResponse(AutocorrectionResponseType, const String& replacedString, const String& replacementString) = 0;
+ virtual void recordAutocorrectionResponse(AutocorrectionResponse, const String& replacedString, const String& replacementString) = 0;
#endif
#if USE(DICTATION_ALTERNATIVES)
virtual void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext) = 0;
@@ -73,6 +73,4 @@ public:
#endif
};
-}
-
-#endif // AlternativeTextClient_h
+} // namespace WebCore