Chromium Code Reviews| Index: chrome/browser/extensions/api/braille_display_private/braille_controller.h |
| diff --git a/chrome/browser/extensions/api/braille_display_private/braille_controller.h b/chrome/browser/extensions/api/braille_display_private/braille_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..473cf05fae46e59ce35e671d38fb046ff912c19a |
| --- /dev/null |
| +++ b/chrome/browser/extensions/api/braille_display_private/braille_controller.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/values.h" |
| +#include "chrome/common/extensions/api/braille_display_private.h" |
| + |
| +namespace extensions { |
| +namespace api { |
| +namespace braille_display_private { |
| +class BrailleController { |
| + public: |
| + class Observer { |
|
David Tseng
2013/09/05 19:21:23
Curious why you decided to nest the Observer class
|
| + public: |
| + virtual void OnKeyEvent( |
| + const extensions::api::braille_display_private::KeyEvent &event) {} |
| + }; |
| + |
| + static BrailleController* GetInstance(); |
| + |
| + virtual scoped_ptr<base::DictionaryValue> GetDisplayState() = 0; |
| + virtual void WriteDots(const std::string& cells) = 0; |
|
David Tseng
2013/09/05 19:21:23
I was expecting an array of bytes?
|
| + virtual void AddObserver(Observer* observer) = 0; |
| + virtual void RemoveObserver(Observer* observer) = 0; |
| + |
| + protected: |
| + BrailleController(); |
| + virtual ~BrailleController(); |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(BrailleController); |
| +}; |
| +} // namespace braille_display_private |
| +} // namespace api |
| +} // namespace extensions |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER_H_ |