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 BrailleController { | |
19 public: | |
20 class Observer { | |
David Tseng
2013/09/05 19:21:23
Curious why you decided to nest the Observer class
| |
21 public: | |
22 virtual void OnKeyEvent( | |
23 const extensions::api::braille_display_private::KeyEvent &event) {} | |
24 }; | |
25 | |
26 static BrailleController* GetInstance(); | |
27 | |
28 virtual scoped_ptr<base::DictionaryValue> GetDisplayState() = 0; | |
29 virtual void WriteDots(const std::string& cells) = 0; | |
David Tseng
2013/09/05 19:21:23
I was expecting an array of bytes?
| |
30 virtual void AddObserver(Observer* observer) = 0; | |
31 virtual void RemoveObserver(Observer* observer) = 0; | |
32 | |
33 protected: | |
34 BrailleController(); | |
35 virtual ~BrailleController(); | |
36 private: | |
37 DISALLOW_COPY_AND_ASSIGN(BrailleController); | |
38 }; | |
39 } // namespace braille_display_private | |
40 } // namespace api | |
41 } // namespace extensions | |
42 | |
43 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROL LER_H_ | |
OLD | NEW |