Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.h

Issue 2401393003: Add multiline braille support. (Closed)
Patch Set: more tests Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 8 #include <memory>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/files/file_path_watcher.h" 11 #include "base/files/file_path_watcher.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "chrome/browser/extensions/api/braille_display_private/braille_controll er.h" 15 #include "chrome/browser/extensions/api/braille_display_private/braille_controll er.h"
16 #include "chrome/browser/extensions/api/braille_display_private/brlapi_connectio n.h" 16 #include "chrome/browser/extensions/api/braille_display_private/brlapi_connectio n.h"
17 #include "library_loaders/libbrlapi.h" 17 #include "library_loaders/libbrlapi.h"
18 18
19 namespace extensions { 19 namespace extensions {
20 namespace api { 20 namespace api {
21 namespace braille_display_private { 21 namespace braille_display_private {
22 22
23 // BrailleController implementation based on libbrlapi from brltty. 23 // BrailleController implementation based on libbrlapi from brltty.
24 class BrailleControllerImpl : public BrailleController { 24 class BrailleControllerImpl : public BrailleController {
25 public: 25 public:
26 static BrailleControllerImpl* GetInstance(); 26 static BrailleControllerImpl* GetInstance();
27 std::unique_ptr<DisplayState> GetDisplayState() override; 27 std::unique_ptr<DisplayState> GetDisplayState() override;
28 void WriteDots(const std::vector<char>& cells) override; 28 void WriteDots(const std::vector<char>& cells,
29 unsigned int cols,
30 unsigned int rows) override;
29 void AddObserver(BrailleObserver* observer) override; 31 void AddObserver(BrailleObserver* observer) override;
30 void RemoveObserver(BrailleObserver* observer) override; 32 void RemoveObserver(BrailleObserver* observer) override;
31 33
32 private: 34 private:
33 // For the unit tests. 35 // For the unit tests.
34 friend class BrailleDisplayPrivateApiTest; 36 friend class BrailleDisplayPrivateApiTest;
35 friend class MockBrlapiConnection; 37 friend class MockBrlapiConnection;
36 38
37 BrailleControllerImpl(); 39 BrailleControllerImpl();
38 ~BrailleControllerImpl() override; 40 ~BrailleControllerImpl() override;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 friend struct base::DefaultSingletonTraits<BrailleControllerImpl>; 85 friend struct base::DefaultSingletonTraits<BrailleControllerImpl>;
84 86
85 DISALLOW_COPY_AND_ASSIGN(BrailleControllerImpl); 87 DISALLOW_COPY_AND_ASSIGN(BrailleControllerImpl);
86 }; 88 };
87 89
88 } // namespace braille_display_private 90 } // namespace braille_display_private
89 } // namespace api 91 } // namespace api
90 } // namespace extensions 92 } // namespace extensions
91 93
92 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROL LER_BRLAPI_H_ 94 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROL LER_BRLAPI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698