| 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 <memory> | 8 #include <memory> | 
| 9 | 9 | 
| 10 #include "ash/common/keyboard/keyboard_ui.h" | 10 #include "ash/common/keyboard/keyboard_ui.h" | 
| 11 #include "base/macros.h" | 11 #include "base/macros.h" | 
| 12 #include "mojo/public/cpp/bindings/binding.h" | 12 #include "mojo/public/cpp/bindings/binding.h" | 
| 13 #include "ui/keyboard/keyboard.mojom.h" | 13 #include "ui/keyboard/keyboard.mojom.h" | 
| 14 | 14 | 
| 15 namespace shell { | 15 namespace service_manager { | 
| 16 class Connector; | 16 class Connector; | 
| 17 } | 17 } | 
| 18 | 18 | 
| 19 namespace ash { | 19 namespace ash { | 
| 20 | 20 | 
| 21 class KeyboardUIMus : public KeyboardUI, | 21 class KeyboardUIMus : public KeyboardUI, | 
| 22                       public keyboard::mojom::KeyboardObserver { | 22                       public keyboard::mojom::KeyboardObserver { | 
| 23  public: | 23  public: | 
| 24   explicit KeyboardUIMus(::shell::Connector* connector); | 24   explicit KeyboardUIMus(service_manager::Connector* connector); | 
| 25   ~KeyboardUIMus() override; | 25   ~KeyboardUIMus() override; | 
| 26 | 26 | 
| 27   static std::unique_ptr<KeyboardUI> Create(::shell::Connector* connector); | 27   static std::unique_ptr<KeyboardUI> Create( | 
|  | 28       service_manager::Connector* connector); | 
| 28 | 29 | 
| 29   // KeyboardUI: | 30   // KeyboardUI: | 
| 30   void Hide() override; | 31   void Hide() override; | 
| 31   void Show() override; | 32   void Show() override; | 
| 32   bool IsEnabled() override; | 33   bool IsEnabled() override; | 
| 33 | 34 | 
| 34   // keyboard::mojom::KeyboardObserver: | 35   // keyboard::mojom::KeyboardObserver: | 
| 35   void OnKeyboardStateChanged(bool is_enabled, | 36   void OnKeyboardStateChanged(bool is_enabled, | 
| 36                               bool is_visible, | 37                               bool is_visible, | 
| 37                               uint64_t display_id, | 38                               uint64_t display_id, | 
| 38                               const gfx::Rect& bounds) override; | 39                               const gfx::Rect& bounds) override; | 
| 39 | 40 | 
| 40  private: | 41  private: | 
| 41   bool is_enabled_; | 42   bool is_enabled_; | 
| 42 | 43 | 
| 43   keyboard::mojom::KeyboardPtr keyboard_; | 44   keyboard::mojom::KeyboardPtr keyboard_; | 
| 44   mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_; | 45   mojo::Binding<keyboard::mojom::KeyboardObserver> observer_binding_; | 
| 45 | 46 | 
| 46   DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus); | 47   DISALLOW_COPY_AND_ASSIGN(KeyboardUIMus); | 
| 47 }; | 48 }; | 
| 48 | 49 | 
| 49 }  // namespace ash | 50 }  // namespace ash | 
| 50 | 51 | 
| 51 #endif  // ASH_MUS_KEYBOARD_UI_MUS_H_ | 52 #endif  // ASH_MUS_KEYBOARD_UI_MUS_H_ | 
| OLD | NEW | 
|---|