| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_MUS_KEYBOARD_UI_MUS_H_ | 5 #ifndef ASH_MUS_KEYBOARD_UI_MUS_H_ |
| 6 #define ASH_MUS_KEYBOARD_UI_MUS_H_ | 6 #define ASH_MUS_KEYBOARD_UI_MUS_H_ |
| 7 | 7 |
| 8 #include "ash/keyboard/keyboard_ui.h" | 8 #include "ash/keyboard/keyboard_ui.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| 11 #include "ui/keyboard/keyboard.mojom.h" | 11 #include "ui/keyboard/keyboard.mojom.h" |
| 12 | 12 |
| 13 namespace mojo { | 13 namespace mojo { |
| 14 class Shell; | 14 class Connector; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 | 18 |
| 19 class KeyboardUIMus : public KeyboardUI, | 19 class KeyboardUIMus : public KeyboardUI, |
| 20 public keyboard::mojom::KeyboardObserver { | 20 public keyboard::mojom::KeyboardObserver { |
| 21 public: | 21 public: |
| 22 explicit KeyboardUIMus(mojo::Shell* mojo_shell); | 22 explicit KeyboardUIMus(mojo::Connector* connector); |
| 23 ~KeyboardUIMus() override; | 23 ~KeyboardUIMus() override; |
| 24 | 24 |
| 25 static scoped_ptr<KeyboardUI> Create(mojo::Shell* mojo_shell); | 25 static scoped_ptr<KeyboardUI> Create(mojo::Connector* connector); |
| 26 | 26 |
| 27 // KeyboardUI: | 27 // KeyboardUI: |
| 28 void Hide() override; | 28 void Hide() override; |
| 29 void Show() override; | 29 void Show() override; |
| 30 bool IsEnabled() override; | 30 bool IsEnabled() override; |
| 31 | 31 |
| 32 // keyboard::mojom::KeyboardObserver: | 32 // keyboard::mojom::KeyboardObserver: |
| 33 void OnKeyboardStateChanged(bool is_enabled, | 33 void OnKeyboardStateChanged(bool is_enabled, |
| 34 bool is_visible, | 34 bool is_visible, |
| 35 uint64_t display_id, | 35 uint64_t display_id, |
| 36 mojo::RectPtr bounds) override; | 36 mojo::RectPtr bounds) override; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 bool is_enabled_; | 39 bool is_enabled_; |
| 40 | 40 |
| 41 keyboard::mojom::KeyboardPtr keyboard_; | 41 keyboard::mojom::KeyboardPtr keyboard_; |
| 42 mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_; | 42 mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_; |
| 43 | 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus); | 44 DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 } // namespace ash | 47 } // namespace ash |
| 48 | 48 |
| 49 #endif // ASH_MUS_KEYBOARD_UI_MUS_H_ | 49 #endif // ASH_MUS_KEYBOARD_UI_MUS_H_ |
| OLD | NEW |