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

Unified Diff: third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.h

Issue 2931443003: Add support for Android spellcheck menu in Chrome/WebViews (Closed)
Patch Set: Fix dependency Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.h
diff --git a/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.h b/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..7afa335fb5dc46512189d6907cdeeca9b6467672
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.h
@@ -0,0 +1,36 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TextSuggestionBackendImpl_h
+#define TextSuggestionBackendImpl_h
+
+#include "core/CoreExport.h"
+#include "platform/heap/Persistent.h"
+#include "public/platform/input_messages.mojom-blink.h"
+
+namespace blink {
+
+class LocalFrame;
+
+// Implementation of mojom::blink::TextSuggestionBackend
+class CORE_EXPORT TextSuggestionBackendImpl final
+ : public mojom::blink::TextSuggestionBackend {
+ public:
+ explicit TextSuggestionBackendImpl(LocalFrame&);
yosin_UTC9 2017/06/16 01:21:04 Can we make ctor to private since we have |Create|
rlanday 2017/06/16 22:16:53 We can't use MakeUnique() inside Create() if we ma
+
+ static void Create(LocalFrame*, mojom::blink::TextSuggestionBackendRequest);
+
+ void ApplySpellCheckSuggestion(const String& suggestion) override;
+ void DeleteActiveSuggestionRange() override;
+ void NewWordAddedToDictionary(const String& word) override;
+ void SpellCheckMenuTimeoutCallback() override;
+ void SuggestionMenuClosed() override;
+
+ private:
+ WeakPersistent<LocalFrame> frame_;
+};
+
+} // namespace blink
+
+#endif // TextSuggestionBackendImpl_h

Powered by Google App Engine
This is Rietveld 408576698