| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER
_BRLAPI_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER
_BRLAPI_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER
_BRLAPI_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER
_BRLAPI_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_path_watcher.h" | 9 #include "base/files/file_path_watcher.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void StartConnecting(); | 54 void StartConnecting(); |
| 55 void StartWatchingSocketDirOnFileThread(); | 55 void StartWatchingSocketDirOnFileThread(); |
| 56 void OnSocketDirChangedOnFileThread(const base::FilePath& path, bool error); | 56 void OnSocketDirChangedOnFileThread(const base::FilePath& path, bool error); |
| 57 void OnSocketDirChangedOnIOThread(); | 57 void OnSocketDirChangedOnIOThread(); |
| 58 void TryToConnect(); | 58 void TryToConnect(); |
| 59 void ResetRetryConnectHorizon(); | 59 void ResetRetryConnectHorizon(); |
| 60 void ScheduleTryToConnect(); | 60 void ScheduleTryToConnect(); |
| 61 void Disconnect(); | 61 void Disconnect(); |
| 62 scoped_ptr<BrlapiConnection> CreateBrlapiConnection(); | 62 scoped_ptr<BrlapiConnection> CreateBrlapiConnection(); |
| 63 void DispatchKeys(); | 63 void DispatchKeys(); |
| 64 scoped_ptr<KeyEvent> MapKeyCode(brlapi_keyCode_t code); | |
| 65 void DispatchKeyEvent(scoped_ptr<KeyEvent> event); | 64 void DispatchKeyEvent(scoped_ptr<KeyEvent> event); |
| 66 void DispatchOnDisplayStateChanged(scoped_ptr<DisplayState> new_state); | 65 void DispatchOnDisplayStateChanged(scoped_ptr<DisplayState> new_state); |
| 67 | 66 |
| 68 CreateBrlapiConnectionFunction create_brlapi_connection_function_; | 67 CreateBrlapiConnectionFunction create_brlapi_connection_function_; |
| 69 | 68 |
| 70 // Manipulated on the IO thread. | 69 // Manipulated on the IO thread. |
| 71 LibBrlapiLoader libbrlapi_loader_; | 70 LibBrlapiLoader libbrlapi_loader_; |
| 72 scoped_ptr<BrlapiConnection> connection_; | 71 scoped_ptr<BrlapiConnection> connection_; |
| 73 bool started_connecting_; | 72 bool started_connecting_; |
| 74 bool connect_scheduled_; | 73 bool connect_scheduled_; |
| 75 base::Time retry_connect_horizon_; | 74 base::Time retry_connect_horizon_; |
| 76 | 75 |
| 77 // Manipulated on the UI thread. | 76 // Manipulated on the UI thread. |
| 78 ObserverList<BrailleObserver> observers_; | 77 ObserverList<BrailleObserver> observers_; |
| 79 | 78 |
| 80 // Manipulated on the FILE thread. | 79 // Manipulated on the FILE thread. |
| 81 base::FilePathWatcher file_path_watcher_; | 80 base::FilePathWatcher file_path_watcher_; |
| 82 | 81 |
| 83 friend struct DefaultSingletonTraits<BrailleControllerImpl>; | 82 friend struct DefaultSingletonTraits<BrailleControllerImpl>; |
| 84 | 83 |
| 85 DISALLOW_COPY_AND_ASSIGN(BrailleControllerImpl); | 84 DISALLOW_COPY_AND_ASSIGN(BrailleControllerImpl); |
| 86 }; | 85 }; |
| 87 | 86 |
| 88 } // namespace braille_display_private | 87 } // namespace braille_display_private |
| 89 } // namespace api | 88 } // namespace api |
| 90 } // namespace extensions | 89 } // namespace extensions |
| 91 | 90 |
| 92 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROL
LER_BRLAPI_H_ | 91 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROL
LER_BRLAPI_H_ |
| OLD | NEW |