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

Side by Side Diff: chrome/browser/extensions/api/system_indicator/system_indicator_api.h

Issue 14694010: Consolidate manifest handler registration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_API_H_
7 7
8 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" 8 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
10 #include "chrome/browser/extensions/extension_function.h" 9 #include "chrome/browser/extensions/extension_function.h"
11 10
12 class Profile; 11 class Profile;
13 12
14 namespace extensions { 13 namespace extensions {
15 14
16 class SystemIndicatorAPI : public ProfileKeyedAPI {
17 public:
18 explicit SystemIndicatorAPI(Profile* profile);
19 virtual ~SystemIndicatorAPI();
20
21 // ProfileKeyedAPI implementation.
22 static ProfileKeyedAPIFactory<SystemIndicatorAPI>* GetFactoryInstance();
23
24 private:
25 friend class ProfileKeyedAPIFactory<SystemIndicatorAPI>;
26
27 // ProfileKeyedAPI implementation.
28 static const char* service_name() {
29 return "SystemIndicatorAPI";
30 }
31 static const bool kServiceIsNULLWhileTesting = true;
32
33 DISALLOW_COPY_AND_ASSIGN(SystemIndicatorAPI);
34 };
35
36 class SystemIndicatorSetIconFunction : public ExtensionActionSetIconFunction { 15 class SystemIndicatorSetIconFunction : public ExtensionActionSetIconFunction {
37 public: 16 public:
38 DECLARE_EXTENSION_FUNCTION("systemIndicator.setIcon", SYSTEMINDICATOR_SETICON) 17 DECLARE_EXTENSION_FUNCTION("systemIndicator.setIcon", SYSTEMINDICATOR_SETICON)
39 18
40 protected: 19 protected:
41 virtual ~SystemIndicatorSetIconFunction() {} 20 virtual ~SystemIndicatorSetIconFunction() {}
42 }; 21 };
43 22
44 class SystemIndicatorEnableFunction : public ExtensionActionShowFunction { 23 class SystemIndicatorEnableFunction : public ExtensionActionShowFunction {
45 public: 24 public:
46 DECLARE_EXTENSION_FUNCTION("systemIndicator.enable", SYSTEMINDICATOR_ENABLE) 25 DECLARE_EXTENSION_FUNCTION("systemIndicator.enable", SYSTEMINDICATOR_ENABLE)
47 26
48 protected: 27 protected:
49 virtual ~SystemIndicatorEnableFunction() {} 28 virtual ~SystemIndicatorEnableFunction() {}
50 }; 29 };
51 30
52 class SystemIndicatorDisableFunction : public ExtensionActionHideFunction { 31 class SystemIndicatorDisableFunction : public ExtensionActionHideFunction {
53 public: 32 public:
54 DECLARE_EXTENSION_FUNCTION("systemIndicator.disable", SYSTEMINDICATOR_DISABLE) 33 DECLARE_EXTENSION_FUNCTION("systemIndicator.disable", SYSTEMINDICATOR_DISABLE)
55 34
56 protected: 35 protected:
57 virtual ~SystemIndicatorDisableFunction() {} 36 virtual ~SystemIndicatorDisableFunction() {}
58 }; 37 };
59 38
60 } // namespace extensions 39 } // namespace extensions
61 40
62 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_API_H _ 41 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_API_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698