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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 14 matching lines...) Expand all Loading... |
25 public: | 25 public: |
26 // |connector| may be null in tests. | 26 // |connector| may be null in tests. |
27 explicit KeyboardUIMus(service_manager::Connector* connector); | 27 explicit KeyboardUIMus(service_manager::Connector* connector); |
28 ~KeyboardUIMus() override; | 28 ~KeyboardUIMus() override; |
29 | 29 |
30 static std::unique_ptr<KeyboardUI> Create( | 30 static std::unique_ptr<KeyboardUI> Create( |
31 service_manager::Connector* connector); | 31 service_manager::Connector* connector); |
32 | 32 |
33 // KeyboardUI: | 33 // KeyboardUI: |
34 void Hide() override; | 34 void Hide() override; |
35 void Show() override; | |
36 void ShowInDisplay(const int64_t display_id) override; | 35 void ShowInDisplay(const int64_t display_id) override; |
37 bool IsEnabled() override; | 36 bool IsEnabled() override; |
38 | 37 |
39 // keyboard::mojom::KeyboardObserver: | 38 // keyboard::mojom::KeyboardObserver: |
40 void OnKeyboardStateChanged(bool is_enabled, | 39 void OnKeyboardStateChanged(bool is_enabled, |
41 bool is_visible, | 40 bool is_visible, |
42 uint64_t display_id, | 41 uint64_t display_id, |
43 const gfx::Rect& bounds) override; | 42 const gfx::Rect& bounds) override; |
44 | 43 |
45 private: | 44 private: |
46 bool is_enabled_; | 45 bool is_enabled_; |
47 | 46 |
48 // May be null during tests. | 47 // May be null during tests. |
49 keyboard::mojom::KeyboardPtr keyboard_; | 48 keyboard::mojom::KeyboardPtr keyboard_; |
50 mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_; | 49 mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_; |
51 | 50 |
52 DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus); | 51 DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus); |
53 }; | 52 }; |
54 | 53 |
55 } // namespace ash | 54 } // namespace ash |
56 | 55 |
57 #endif // ASH_MUS_KEYBOARD_UI_MUS_H_ | 56 #endif // ASH_MUS_KEYBOARD_UI_MUS_H_ |
OLD | NEW |