OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "services/ui/ws/accessibility_manager.h" | |
6 | |
7 #include "services/ui/ws/window_server.h" | |
8 | |
9 namespace ui { | |
10 namespace ws { | |
11 | |
12 AccessibilityManager::AccessibilityManager(WindowServer* window_server) | |
13 : window_server_(window_server), binding_(this) { | |
14 DCHECK(window_server_); | |
15 } | |
16 | |
17 AccessibilityManager::~AccessibilityManager() {} | |
18 | |
19 void AccessibilityManager::Bind(mojom::AccessibilityManagerRequest request) { | |
20 if (binding_.is_bound()) | |
sky
2016/07/08 16:45:00
nit: I'm pretty sure you can always call binding_.
sadrul
2016/07/08 17:33:25
Done.
| |
21 binding_.Close(); | |
22 binding_.Bind(std::move(request)); | |
23 binding_.set_connection_error_handler( | |
24 base::Bind(&mojo::Binding<mojom::AccessibilityManager>::Close, | |
sky
2016/07/08 16:45:00
Do you really need this? Seems like it doesn't mat
sadrul
2016/07/08 17:33:25
Cool. Removed.
| |
25 base::Unretained(&binding_))); | |
26 } | |
27 | |
28 void AccessibilityManager::SetHighContrastMode(bool enabled) { | |
29 window_server_->SetHighContrastMode(enabled); | |
sky
2016/07/08 16:45:00
Isn't high contrast mode specific to a user and no
sadrul
2016/07/08 17:33:25
Oh yeah, good point. Fixed.
| |
30 } | |
31 | |
32 } // namespace ws | |
33 } // namespace ui | |
OLD | NEW |