OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/api/braille_display_private/braille_controll
er_brlapi.h" | 5 #include "chrome/browser/extensions/api/braille_display_private/braille_controll
er_brlapi.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cerrno> | 8 #include <cerrno> |
9 #include <cstring> | 9 #include <cstring> |
10 #include <vector> | 10 #include <vector> |
(...skipping 28 matching lines...) Expand all Loading... |
39 BrailleController::~BrailleController() { | 39 BrailleController::~BrailleController() { |
40 } | 40 } |
41 | 41 |
42 // static | 42 // static |
43 BrailleController* BrailleController::GetInstance() { | 43 BrailleController* BrailleController::GetInstance() { |
44 return BrailleControllerImpl::GetInstance(); | 44 return BrailleControllerImpl::GetInstance(); |
45 } | 45 } |
46 | 46 |
47 // static | 47 // static |
48 BrailleControllerImpl* BrailleControllerImpl::GetInstance() { | 48 BrailleControllerImpl* BrailleControllerImpl::GetInstance() { |
49 return Singleton<BrailleControllerImpl, | 49 return base::Singleton< |
50 LeakySingletonTraits<BrailleControllerImpl> >::get(); | 50 BrailleControllerImpl, |
| 51 base::LeakySingletonTraits<BrailleControllerImpl>>::get(); |
51 } | 52 } |
52 | 53 |
53 BrailleControllerImpl::BrailleControllerImpl() | 54 BrailleControllerImpl::BrailleControllerImpl() |
54 : started_connecting_(false), | 55 : started_connecting_(false), |
55 connect_scheduled_(false) { | 56 connect_scheduled_(false) { |
56 create_brlapi_connection_function_ = base::Bind( | 57 create_brlapi_connection_function_ = base::Bind( |
57 &BrailleControllerImpl::CreateBrlapiConnection, | 58 &BrailleControllerImpl::CreateBrlapiConnection, |
58 base::Unretained(this)); | 59 base::Unretained(this)); |
59 } | 60 } |
60 | 61 |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 314 } |
314 return; | 315 return; |
315 } | 316 } |
316 FOR_EACH_OBSERVER(BrailleObserver, observers_, | 317 FOR_EACH_OBSERVER(BrailleObserver, observers_, |
317 OnBrailleDisplayStateChanged(*new_state)); | 318 OnBrailleDisplayStateChanged(*new_state)); |
318 } | 319 } |
319 | 320 |
320 } // namespace braille_display_private | 321 } // namespace braille_display_private |
321 } // namespace api | 322 } // namespace api |
322 } // namespace extensions | 323 } // namespace extensions |
OLD | NEW |