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

Unified Diff: ash/mus/keyboard_ui_mus.h

Issue 1684823004: Refactors keyboard related code so mash can use a keyboard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 4 years, 10 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
« no previous file with comments | « ash/mus/BUILD.gn ('k') | ash/mus/keyboard_ui_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/keyboard_ui_mus.h
diff --git a/ash/mus/keyboard_ui_mus.h b/ash/mus/keyboard_ui_mus.h
new file mode 100644
index 0000000000000000000000000000000000000000..3ebf826ab3a6d312e30318941ffad73c51153375
--- /dev/null
+++ b/ash/mus/keyboard_ui_mus.h
@@ -0,0 +1,49 @@
+// Copyright 2016 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 ASH_MUS_KEYBOARD_UI_MUS_H_
+#define ASH_MUS_KEYBOARD_UI_MUS_H_
+
+#include "ash/keyboard/keyboard_ui.h"
+#include "base/macros.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "ui/keyboard/keyboard.mojom.h"
+
+namespace mojo {
+class Shell;
+}
+
+namespace ash {
+
+class KeyboardUIMus : public KeyboardUI,
+ public keyboard::mojom::KeyboardObserver {
+ public:
+ explicit KeyboardUIMus(mojo::Shell* mojo_shell);
+ ~KeyboardUIMus() override;
+
+ static scoped_ptr<KeyboardUI> Create(mojo::Shell* mojo_shell);
+
+ // KeyboardUI:
+ void Hide() override;
+ void Show() override;
+ bool IsEnabled() override;
+
+ // keyboard::mojom::KeyboardObserver:
+ void OnKeyboardStateChanged(bool is_enabled,
+ bool is_visible,
+ uint64_t display_id,
+ mojo::RectPtr bounds) override;
+
+ private:
+ bool is_enabled_;
+
+ keyboard::mojom::KeyboardPtr keyboard_;
+ mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus);
+};
+
+} // namespace ash
+
+#endif // ASH_MUS_KEYBOARD_UI_MUS_H_
« no previous file with comments | « ash/mus/BUILD.gn ('k') | ash/mus/keyboard_ui_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698