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

Side by Side Diff: services/keyboard_native/text_update_key.h

Issue 1247903003: Add spellcheck and word suggestion to the prediction service (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: format README and CHROMIUM.diff Created 5 years, 4 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
« no previous file with comments | « services/keyboard_native/predictor.cc ('k') | services/keyboard_native/text_update_key.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_KEYBOARD_NATIVE_TEXT_UPDATE_KEY_H_
6 #define SERVICES_KEYBOARD_NATIVE_TEXT_UPDATE_KEY_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "services/keyboard_native/key_layout.h"
12
13 class SkCanvas;
14 class SkPaint;
15
16 namespace gfx {
17 class RectF;
18 }
19
20 namespace keyboard {
21 class TextUpdateKey : public KeyLayout::Key {
22 public:
23 TextUpdateKey(std::string text,
24 base::Callback<void(const TextUpdateKey&)> touch_up_callback);
25
26 ~TextUpdateKey() override;
27
28 // Key implementation.
29 void Draw(SkCanvas* canvas,
30 const SkPaint& paint,
31 const gfx::RectF& rect) override;
32
33 const char* ToText() const override;
34
35 void OnTouchUp() override;
36
37 void ChangeText(std::string new_text);
38
39 private:
40 std::string text_;
41 base::Callback<void(const TextUpdateKey&)> touch_up_callback_;
42
43 DISALLOW_COPY_AND_ASSIGN(TextUpdateKey);
44 };
45
46 } // namespace keyboard
47
48 #endif // SERVICES_KEYBOARD_NATIVE_TEXT_UPDATE_KEY_H_
OLDNEW
« no previous file with comments | « services/keyboard_native/predictor.cc ('k') | services/keyboard_native/text_update_key.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698