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_PRIVATE_BRAILLE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_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 |
| 14 namespace extensions { |
| 15 namespace api { |
| 16 namespace braille_private { |
| 17 class BrailleController { |
| 18 public: |
| 19 class Observer { |
| 20 public: |
| 21 virtual void OnKeyEvent(scoped_ptr<base::DictionaryValue> event) {}; |
| 22 }; |
| 23 |
| 24 static void AddWindow(unsigned long windowId); |
| 25 static void RemoveWindow(unsigned long windowId); |
| 26 static BrailleController* GetInstance(); |
| 27 |
| 28 virtual scoped_ptr<base::DictionaryValue> GetDisplayState() = 0; |
| 29 virtual void WriteText(const std::string& text, int cursor) = 0; |
| 30 virtual void AddObserver(Observer* observer) = 0; |
| 31 virtual void RemoveObserver(Observer* observer) = 0; |
| 32 |
| 33 protected: |
| 34 BrailleController(); |
| 35 virtual ~BrailleController(); |
| 36 virtual void AddWindowOnIOThread(unsigned long windowId) = 0; |
| 37 virtual void RemoveWindowOnIOThread(unsigned long windowId) = 0; |
| 38 private: |
| 39 DISALLOW_COPY_AND_ASSIGN(BrailleController); |
| 40 }; |
| 41 } // namespace braille_private |
| 42 } // namespace api |
| 43 } // namespace extensions |
| 44 |
| 45 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_PRIVATE_BRAILLE_CONTROLLER_H_ |
OLD | NEW |