| Index: services/keyboard_native/key_layout.h
|
| diff --git a/services/keyboard_native/key_layout.h b/services/keyboard_native/key_layout.h
|
| index cf579e7c191116137de016937a0be5916858ce6a..293ce9785ef604301cb4f6c983f7e3344db7b3f2 100644
|
| --- a/services/keyboard_native/key_layout.h
|
| +++ b/services/keyboard_native/key_layout.h
|
| @@ -12,7 +12,10 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "mojo/public/cpp/bindings/callback.h"
|
| #include "mojo/services/geometry/public/interfaces/geometry.mojom.h"
|
| +#include "mojo/tools/embed/data.h"
|
| #include "third_party/skia/include/core/SkCanvas.h"
|
| +#include "third_party/skia/include/core/SkImageDecoder.h"
|
| +#include "third_party/skia/include/core/SkStream.h"
|
| #include "ui/gfx/geometry/point.h"
|
| #include "ui/gfx/geometry/rect.h"
|
|
|
| @@ -77,6 +80,21 @@ class KeyLayout {
|
| DISALLOW_COPY_AND_ASSIGN(TextKey);
|
| };
|
|
|
| + // An implementation of Key that draws itself as an image.
|
| + class ImageKey : public TextKey {
|
| + public:
|
| + ImageKey(const char* text,
|
| + base::Callback<void(const TextKey&)> touch_up_callback,
|
| + const mojo::embed::Data& data);
|
| + ~ImageKey() override;
|
| + void Draw(SkCanvas* canvas, SkPaint paint, const gfx::RectF& rect) override;
|
| +
|
| + private:
|
| + SkBitmap bitmap_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ImageKey);
|
| + };
|
| +
|
| // initializes the *_layout_ vectors.
|
| void InitLayouts();
|
|
|
|
|