| 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_ACTIONS_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTIONS_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTIONS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTIONS_API_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
| 10 #include "chrome/common/extensions/extension_action.h" | 10 #include "chrome/common/extensions/extension_action.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class DictionaryValue; | 13 class DictionaryValue; |
| 14 } | 14 } |
| 15 class TabContentsWrapper; | 15 class TabContents; |
| 16 typedef TabContents TabContentsWrapper; |
| 16 | 17 |
| 17 // Implementation of both the browserAction and pageAction APIs. | 18 // Implementation of both the browserAction and pageAction APIs. |
| 18 // | 19 // |
| 19 // Divergent behaviour between the two is minimal (pageAction has required | 20 // Divergent behaviour between the two is minimal (pageAction has required |
| 20 // tabIds while browserAction's are optional, they have different internal | 21 // tabIds while browserAction's are optional, they have different internal |
| 21 // browser notification requirements, and not all functions are defined for | 22 // browser notification requirements, and not all functions are defined for |
| 22 // both APIs). | 23 // both APIs). |
| 23 class ExtensionActionFunction : public SyncExtensionFunction { | 24 class ExtensionActionFunction : public SyncExtensionFunction { |
| 24 public: | 25 public: |
| 25 static bool ParseCSSColorString(const std::string& color_string, | 26 static bool ParseCSSColorString(const std::string& color_string, |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 131 |
| 131 // getBadgeBackgroundColor | 132 // getBadgeBackgroundColor |
| 132 class ExtensionActionGetBadgeBackgroundColorFunction | 133 class ExtensionActionGetBadgeBackgroundColorFunction |
| 133 : public ExtensionActionFunction { | 134 : public ExtensionActionFunction { |
| 134 protected: | 135 protected: |
| 135 virtual ~ExtensionActionGetBadgeBackgroundColorFunction() {} | 136 virtual ~ExtensionActionGetBadgeBackgroundColorFunction() {} |
| 136 virtual bool RunExtensionAction() OVERRIDE; | 137 virtual bool RunExtensionAction() OVERRIDE; |
| 137 }; | 138 }; |
| 138 | 139 |
| 139 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTIONS_API_
H_ | 140 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTIONS_API_
H_ |
| OLD | NEW |