OLD | NEW |
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_EXTENSION_ACTION_EXTENSION_SCRIPT_BADGE_AP
I_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_SCRIPT_BADGE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_SCRIPT_BADGE_AP
I_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_SCRIPT_BADGE_API_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/api/extension_action/extension_actions_api.h
" | 8 #include "chrome/browser/extensions/api/extension_action/extension_actions_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 namespace extensions { |
| 13 |
| 14 class ScriptBadgeAPI : public ProfileKeyedAPI { |
| 15 public: |
| 16 explicit ScriptBadgeAPI(Profile* profile); |
| 17 virtual ~ScriptBadgeAPI(); |
| 18 |
| 19 // ProfileKeyedAPI implementation. |
| 20 static ProfileKeyedAPIFactory<ScriptBadgeAPI>* GetFactoryInstance(); |
| 21 |
| 22 private: |
| 23 friend class ProfileKeyedAPIFactory<ScriptBadgeAPI>; |
| 24 |
| 25 // ProfileKeyedAPI implementation. |
| 26 static const char* service_name() { return "ScriptBadgeAPI"; } |
| 27 |
| 28 DISALLOW_COPY_AND_ASSIGN(ScriptBadgeAPI); |
| 29 }; |
| 30 |
11 // | 31 // |
12 // scriptBadge.* aliases for supported scriptBadge APIs. | 32 // scriptBadge.* aliases for supported scriptBadge APIs. |
13 // | 33 // |
14 | 34 |
15 class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction { | 35 class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction { |
16 public: | 36 public: |
17 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.setPopup") | 37 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.setPopup") |
18 | 38 |
19 protected: | 39 protected: |
20 virtual ~ScriptBadgeSetPopupFunction() {} | 40 virtual ~ScriptBadgeSetPopupFunction() {} |
(...skipping 11 matching lines...) Expand all Loading... |
32 class ScriptBadgeGetAttentionFunction : public ExtensionActionFunction { | 52 class ScriptBadgeGetAttentionFunction : public ExtensionActionFunction { |
33 public: | 53 public: |
34 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.getAttention") | 54 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.getAttention") |
35 | 55 |
36 virtual bool RunExtensionAction() OVERRIDE; | 56 virtual bool RunExtensionAction() OVERRIDE; |
37 | 57 |
38 protected: | 58 protected: |
39 virtual ~ScriptBadgeGetAttentionFunction(); | 59 virtual ~ScriptBadgeGetAttentionFunction(); |
40 }; | 60 }; |
41 | 61 |
42 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_SCRIPT_BADGE
_API_H_ | 62 } // namespace extensions |
| 63 |
| 64 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_SCRIPT_BADGE_API_H_ |
OLD | NEW |