Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: chrome/browser/extensions/api/braille_private/braille_controller.h

Issue 13355002: Implement chrome.brailleDisplayPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698