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

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

Issue 12618009: Move SystemIndicator parsing out of Extension class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/system_indicator/system_indicator_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
9 #include "chrome/browser/extensions/extension_function.h" 10 #include "chrome/browser/extensions/extension_function.h"
10 11
12 class Profile;
13
11 namespace extensions { 14 namespace extensions {
12 15
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
13 class SystemIndicatorSetIconFunction : public ExtensionActionSetIconFunction { 36 class SystemIndicatorSetIconFunction : public ExtensionActionSetIconFunction {
14 public: 37 public:
15 DECLARE_EXTENSION_FUNCTION("systemIndicator.setIcon", SYSTEMINDICATOR_SETICON) 38 DECLARE_EXTENSION_FUNCTION("systemIndicator.setIcon", SYSTEMINDICATOR_SETICON)
16 39
17 protected: 40 protected:
18 virtual ~SystemIndicatorSetIconFunction() {} 41 virtual ~SystemIndicatorSetIconFunction() {}
19 }; 42 };
20 43
21 class SystemIndicatorEnableFunction : public ExtensionActionShowFunction { 44 class SystemIndicatorEnableFunction : public ExtensionActionShowFunction {
22 public: 45 public:
23 DECLARE_EXTENSION_FUNCTION("systemIndicator.enable", SYSTEMINDICATOR_ENABLE) 46 DECLARE_EXTENSION_FUNCTION("systemIndicator.enable", SYSTEMINDICATOR_ENABLE)
24 47
25 protected: 48 protected:
26 virtual ~SystemIndicatorEnableFunction() {} 49 virtual ~SystemIndicatorEnableFunction() {}
27 }; 50 };
28 51
29 class SystemIndicatorDisableFunction : public ExtensionActionHideFunction { 52 class SystemIndicatorDisableFunction : public ExtensionActionHideFunction {
30 public: 53 public:
31 DECLARE_EXTENSION_FUNCTION("systemIndicator.disable", SYSTEMINDICATOR_DISABLE) 54 DECLARE_EXTENSION_FUNCTION("systemIndicator.disable", SYSTEMINDICATOR_DISABLE)
32 55
33 protected: 56 protected:
34 virtual ~SystemIndicatorDisableFunction() {} 57 virtual ~SystemIndicatorDisableFunction() {}
35 }; 58 };
36 59
37 } // namespace extensions 60 } // namespace extensions
38 61
39 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_API_H _ 62 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_API_H _
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/system_indicator/system_indicator_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698