| Index: chrome/browser/extensions/api/braille_private/braille_controller.h
|
| diff --git a/chrome/browser/extensions/api/braille_private/braille_controller.h b/chrome/browser/extensions/api/braille_private/braille_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8acac85597fd6e6c29de7568c0f1d65debbc4231
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/braille_private/braille_controller.h
|
| @@ -0,0 +1,45 @@
|
| +// 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_PRIVATE_BRAILLE_CONTROLLER_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_PRIVATE_BRAILLE_CONTROLLER_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "base/values.h"
|
| +
|
| +namespace extensions {
|
| +namespace api {
|
| +namespace braille_private {
|
| +class BrailleController {
|
| + public:
|
| + class Observer {
|
| + public:
|
| + virtual void OnKeyEvent(scoped_ptr<base::DictionaryValue> event) {};
|
| + };
|
| +
|
| + static void AddWindow(unsigned long windowId);
|
| + static void RemoveWindow(unsigned long windowId);
|
| + static BrailleController* GetInstance();
|
| +
|
| + virtual scoped_ptr<base::DictionaryValue> GetDisplayState() = 0;
|
| + virtual void WriteText(const std::string& text, int cursor) = 0;
|
| + virtual void AddObserver(Observer* observer) = 0;
|
| + virtual void RemoveObserver(Observer* observer) = 0;
|
| +
|
| + protected:
|
| + BrailleController();
|
| + virtual ~BrailleController();
|
| + virtual void AddWindowOnIOThread(unsigned long windowId) = 0;
|
| + virtual void RemoveWindowOnIOThread(unsigned long windowId) = 0;
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(BrailleController);
|
| +};
|
| +} // namespace braille_private
|
| +} // namespace api
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_PRIVATE_BRAILLE_CONTROLLER_H_
|
|
|