| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_SCRIPT_BADGE_API_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_SCRIPT_BADGE_API_H_ | |
| 7 | |
| 8 #include "chrome/browser/extensions/api/extension_action/extension_actions_api.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 { | |
| 15 public: | |
| 16 explicit ScriptBadgeAPI(Profile* profile); | |
| 17 virtual ~ScriptBadgeAPI(); | |
| 18 | |
| 19 // ProfileKeyedService implementation. | |
| 20 virtual void Shutdown() OVERRIDE; | |
| 21 }; | |
| 22 | |
| 23 // | |
| 24 // scriptBadge.* aliases for supported scriptBadge APIs. | |
| 25 // | |
| 26 | |
| 27 class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction { | |
| 28 public: | |
| 29 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.setPopup") | |
| 30 | |
| 31 protected: | |
| 32 virtual ~ScriptBadgeSetPopupFunction() {} | |
| 33 }; | |
| 34 | |
| 35 class ScriptBadgeGetPopupFunction : public ExtensionActionGetPopupFunction { | |
| 36 public: | |
| 37 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.getPopup") | |
| 38 | |
| 39 protected: | |
| 40 virtual ~ScriptBadgeGetPopupFunction() {} | |
| 41 }; | |
| 42 | |
| 43 // scriptBadge.getAttention(tabId) | |
| 44 class ScriptBadgeGetAttentionFunction : public ExtensionActionFunction { | |
| 45 public: | |
| 46 DECLARE_EXTENSION_FUNCTION_NAME("scriptBadge.getAttention") | |
| 47 | |
| 48 virtual bool RunExtensionAction() OVERRIDE; | |
| 49 | |
| 50 protected: | |
| 51 virtual ~ScriptBadgeGetAttentionFunction(); | |
| 52 }; | |
| 53 | |
| 54 } // namespace extensions | |
| 55 | |
| 56 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_SCRIPT_BADGE_API_H_ | |
| OLD | NEW |