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

Side by Side Diff: ash/mus/keyboard_ui_mus.h

Issue 2445293002: Make the virtual keyboard show up on the display with input focus. (Closed)
Patch Set: rebase & update Created 4 years, 1 month 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
OLDNEW
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>
9
8 #include <memory> 10 #include <memory>
9 11
10 #include "ash/common/keyboard/keyboard_ui.h" 12 #include "ash/common/keyboard/keyboard_ui.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "mojo/public/cpp/bindings/binding.h" 14 #include "mojo/public/cpp/bindings/binding.h"
13 #include "ui/keyboard/keyboard.mojom.h" 15 #include "ui/keyboard/keyboard.mojom.h"
14 16
15 namespace service_manager { 17 namespace service_manager {
16 class Connector; 18 class Connector;
17 } 19 }
18 20
19 namespace ash { 21 namespace ash {
20 22
21 class KeyboardUIMus : public KeyboardUI, 23 class KeyboardUIMus : public KeyboardUI,
22 public keyboard::mojom::KeyboardObserver { 24 public keyboard::mojom::KeyboardObserver {
23 public: 25 public:
24 explicit KeyboardUIMus(service_manager::Connector* connector); 26 explicit KeyboardUIMus(service_manager::Connector* connector);
25 ~KeyboardUIMus() override; 27 ~KeyboardUIMus() override;
26 28
27 static std::unique_ptr<KeyboardUI> Create( 29 static std::unique_ptr<KeyboardUI> Create(
28 service_manager::Connector* connector); 30 service_manager::Connector* connector);
29 31
30 // KeyboardUI: 32 // KeyboardUI:
31 void Hide() override; 33 void Hide() override;
32 void Show() override; 34 void Show() override;
35 void ShowInSpecificDisplay(int64_t display_id) override;
oshima 2016/11/08 17:26:04 ShowInDisplay
yhanada 2016/11/14 22:48:47 Done.
33 bool IsEnabled() override; 36 bool IsEnabled() override;
34 37
35 // keyboard::mojom::KeyboardObserver: 38 // keyboard::mojom::KeyboardObserver:
36 void OnKeyboardStateChanged(bool is_enabled, 39 void OnKeyboardStateChanged(bool is_enabled,
37 bool is_visible, 40 bool is_visible,
38 uint64_t display_id, 41 uint64_t display_id,
39 const gfx::Rect& bounds) override; 42 const gfx::Rect& bounds) override;
40 43
41 private: 44 private:
42 bool is_enabled_; 45 bool is_enabled_;
43 46
44 keyboard::mojom::KeyboardPtr keyboard_; 47 keyboard::mojom::KeyboardPtr keyboard_;
45 mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_; 48 mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_;
46 49
47 DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus); 50 DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus);
48 }; 51 };
49 52
50 } // namespace ash 53 } // namespace ash
51 54
52 #endif // ASH_MUS_KEYBOARD_UI_MUS_H_ 55 #endif // ASH_MUS_KEYBOARD_UI_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698