Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER _H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER _H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/values.h" | |
| 13 #include "chrome/common/extensions/api/braille_display_private.h" | |
| 14 | |
| 15 namespace extensions { | |
| 16 namespace api { | |
| 17 namespace braille_display_private { | |
| 18 class BrailleObserver; | |
| 19 | |
| 20 // Singelton class that controls the braille display. | |
|
dmazzoni
2013/09/06 16:49:53
nit: Singelton -> Singleton
| |
| 21 class BrailleController { | |
| 22 public: | |
| 23 static BrailleController* GetInstance(); | |
| 24 | |
| 25 virtual scoped_ptr<base::DictionaryValue> GetDisplayState() = 0; | |
| 26 virtual void WriteDots(const std::string& cells) = 0; | |
| 27 virtual void AddObserver(BrailleObserver* observer) = 0; | |
| 28 virtual void RemoveObserver(BrailleObserver* observer) = 0; | |
| 29 | |
| 30 protected: | |
| 31 BrailleController(); | |
| 32 virtual ~BrailleController(); | |
| 33 private: | |
|
dmazzoni
2013/09/06 16:49:53
Nit: blank line before
| |
| 34 DISALLOW_COPY_AND_ASSIGN(BrailleController); | |
| 35 }; | |
| 36 | |
| 37 // Observer for events from the BrailleController | |
| 38 class BrailleObserver { | |
| 39 public: | |
| 40 virtual void OnKeyEvent( | |
| 41 const extensions::api::braille_display_private::KeyEvent &event) {} | |
| 42 }; | |
| 43 | |
| 44 } // namespace braille_display_private | |
| 45 } // namespace api | |
| 46 } // namespace extensions | |
| 47 | |
| 48 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROL LER_H_ | |
| OLD | NEW |