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_DISPLAY_PR IVATE_API_H_ | |
6 #define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_DISPLAY_PR IVATE_API_H_ | |
7 | |
8 #include "chrome/browser/extensions/api/api_function.h" | |
9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" | |
10 #include "chrome/common/extensions/api/braille_display_private.h" | |
11 | |
12 namespace extensions { | |
13 | |
not at google - send to devlin
2013/09/03 14:35:35
Comment; but can be "implementation of the chrome.
Peter Lundblad
2013/09/03 23:03:34
Done.
| |
14 class BrailleDisplayPrivateAPI : public ProfileKeyedAPI { | |
15 public: | |
16 explicit BrailleDisplayPrivateAPI(Profile* profile); | |
17 virtual ~BrailleDisplayPrivateAPI(); | |
18 | |
19 // ProfileKeyedService implementation. | |
20 virtual void Shutdown() OVERRIDE; | |
21 | |
22 // ProfileKeyedAPI implementation. | |
23 static ProfileKeyedAPIFactory<BrailleDisplayPrivateAPI>* GetFactoryInstance(); | |
24 | |
25 private: | |
26 friend class ProfileKeyedAPIFactory<BrailleDisplayPrivateAPI>; | |
27 | |
28 Profile* profile_; | |
29 | |
30 // ProfileKeyedAPI implementation. | |
31 static const char* service_name() { | |
32 return "BrailleDisplayPrivateAPI"; | |
33 } | |
34 static const bool kServiceIsNULLWhileTesting = true; | |
35 }; | |
36 | |
37 namespace api { | |
38 class BrailleDisplayPrivateGetDisplayStateFunction : public AsyncApiFunction { | |
not at google - send to devlin
2013/09/03 14:35:35
the "AsyncApiFunction" class is for extension func
Peter Lundblad
2013/09/03 23:03:34
The API uses a library that communicates with a de
not at google - send to devlin
2013/09/03 23:40:18
ok sounds good.
| |
39 DECLARE_EXTENSION_FUNCTION("brailleDisplayPrivate.getDisplayState", | |
40 BRAILLEDISPLAYPRIVATE_GETDISPLAYSTATE) | |
41 protected: | |
42 virtual ~BrailleDisplayPrivateGetDisplayStateFunction() {} | |
43 virtual bool Prepare() OVERRIDE; | |
44 virtual void Work() OVERRIDE; | |
45 virtual bool Respond() OVERRIDE; | |
46 }; | |
47 | |
48 class BrailleDisplayPrivateWriteDotsFunction : public AsyncApiFunction { | |
49 DECLARE_EXTENSION_FUNCTION("brailleDisplayPrivate.writeDots", | |
50 BRAILLEDISPLAYPRIVATE_WRITEDOTS) | |
51 public: | |
not at google - send to devlin
2013/09/03 14:35:35
ideally, 1 less indent space here, and a line brea
Peter Lundblad
2013/09/03 23:03:34
Done.
| |
52 BrailleDisplayPrivateWriteDotsFunction(); | |
53 protected: | |
54 virtual ~BrailleDisplayPrivateWriteDotsFunction(); | |
55 virtual bool Prepare() OVERRIDE; | |
56 virtual void Work() OVERRIDE; | |
57 virtual bool Respond() OVERRIDE; | |
58 private: | |
59 scoped_ptr<braille_display_private::WriteDots::Params> params_; | |
60 }; | |
not at google - send to devlin
2013/09/03 14:35:35
and a line break here
Peter Lundblad
2013/09/03 23:03:34
Done.
| |
61 } // namespace api | |
62 } // namespace extensions | |
not at google - send to devlin
2013/09/03 14:35:35
and after here
Peter Lundblad
2013/09/03 23:03:34
Done.
| |
63 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_DISPLAY _PRIVATE_API_H_ | |
OLD | NEW |