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 #include "ash/mus/keyboard_ui_mus.h" | 5 #include "ash/mus/keyboard_ui_mus.h" |
6 | 6 |
7 #include "ash/common/keyboard/keyboard_ui_observer.h" | 7 #include "ash/common/keyboard/keyboard_ui_observer.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "services/service_manager/public/cpp/connector.h" | 9 #include "services/service_manager/public/cpp/connector.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... | |
28 } | 28 } |
29 | 29 |
30 void KeyboardUIMus::Hide() { | 30 void KeyboardUIMus::Hide() { |
31 keyboard_->Hide(); | 31 keyboard_->Hide(); |
32 } | 32 } |
33 | 33 |
34 void KeyboardUIMus::Show() { | 34 void KeyboardUIMus::Show() { |
35 keyboard_->Show(); | 35 keyboard_->Show(); |
36 } | 36 } |
37 | 37 |
38 void KeyboardUIMus::ShowInSpecificDisplay(int64_t display_id) { | |
39 // TODO(yhanada): Send display id | |
oshima
2016/11/08 17:26:04
can you file a bug and add reference to it?
yhanada
2016/11/14 22:48:47
This TODO depends on the TODO in keyboard.mojom:L1
| |
40 keyboard_->Show(); | |
41 } | |
42 | |
38 bool KeyboardUIMus::IsEnabled() { | 43 bool KeyboardUIMus::IsEnabled() { |
39 return is_enabled_; | 44 return is_enabled_; |
40 } | 45 } |
41 | 46 |
42 void KeyboardUIMus::OnKeyboardStateChanged(bool is_enabled, | 47 void KeyboardUIMus::OnKeyboardStateChanged(bool is_enabled, |
43 bool is_visible, | 48 bool is_visible, |
44 uint64_t display_id, | 49 uint64_t display_id, |
45 const gfx::Rect& bounds) { | 50 const gfx::Rect& bounds) { |
46 if (is_enabled_ == is_enabled) | 51 if (is_enabled_ == is_enabled) |
47 return; | 52 return; |
48 | 53 |
49 is_enabled_ = is_enabled; | 54 is_enabled_ = is_enabled; |
50 for (auto& observer : *observers()) | 55 for (auto& observer : *observers()) |
51 observer.OnKeyboardEnabledStateChanged(is_enabled); | 56 observer.OnKeyboardEnabledStateChanged(is_enabled); |
52 } | 57 } |
53 | 58 |
54 } // namespace ash | 59 } // namespace ash |
OLD | NEW |