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/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 #include "chrome/browser/profiles/profile_keyed_service.h" | |
11 | |
12 namespace extensions { | |
13 | |
14 class ScriptBadgeAPI : public ProfileKeyedService { | |
Yoyo Zhou
2012/12/18 02:01:41
By the way, I think it's reasonable to have a sing
Devlin
2012/12/18 20:42:07
Okay. Is it alright if that waits for another CL?
| |
15 public: | |
16 explicit ScriptBadgeAPI(Profile* profile); | |
17 virtual ~ScriptBadgeAPI(); | |
18 | |
19 // ProfileKeyedService implementation. | |
20 virtual void Shutdown() OVERRIDE; | |
21 | |
22 // Convenience method to get the ScriptBadgeAPI for a profile. | |
23 static ScriptBadgeAPI* Get(Profile* profile); | |
24 }; | |
10 | 25 |
11 // | 26 // |
12 // scriptBadge.* aliases for supported scriptBadge APIs. | 27 // scriptBadge.* aliases for supported scriptBadge APIs. |
13 // | 28 // |
14 | 29 |
15 class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction { | 30 class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction { |
16 public: | 31 public: |
17 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.setPopup") | 32 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.setPopup") |
18 | 33 |
19 protected: | 34 protected: |
(...skipping 12 matching lines...) Expand all Loading... | |
32 class ScriptBadgeGetAttentionFunction : public ExtensionActionFunction { | 47 class ScriptBadgeGetAttentionFunction : public ExtensionActionFunction { |
33 public: | 48 public: |
34 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.getAttention") | 49 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.getAttention") |
35 | 50 |
36 virtual bool RunExtensionAction() OVERRIDE; | 51 virtual bool RunExtensionAction() OVERRIDE; |
37 | 52 |
38 protected: | 53 protected: |
39 virtual ~ScriptBadgeGetAttentionFunction(); | 54 virtual ~ScriptBadgeGetAttentionFunction(); |
40 }; | 55 }; |
41 | 56 |
42 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_SCRIPT_BADGE _API_H_ | 57 } // namespace extensions |
58 | |
59 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_SCRIPT_BADGE_API_H_ | |
OLD | NEW |