| 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_EXTENSION_ACTION_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 return *default_value; | 250 return *default_value; |
| 251 } else { | 251 } else { |
| 252 return ValueTraits<T>::CreateEmpty(); | 252 return ValueTraits<T>::CreateEmpty(); |
| 253 } | 253 } |
| 254 } | 254 } |
| 255 | 255 |
| 256 // The id for the extension this action belongs to (as defined in the | 256 // The id for the extension this action belongs to (as defined in the |
| 257 // extension manifest). | 257 // extension manifest). |
| 258 const std::string extension_id_; | 258 const std::string extension_id_; |
| 259 | 259 |
| 260 // The name of the extension. |
| 261 const std::string extension_name_; |
| 262 |
| 260 const extensions::ActionInfo::Type action_type_; | 263 const extensions::ActionInfo::Type action_type_; |
| 261 | 264 |
| 262 // Each of these data items can have both a global state (stored with the key | 265 // Each of these data items can have both a global state (stored with the key |
| 263 // kDefaultTabId), or tab-specific state (stored with the tab_id as the key). | 266 // kDefaultTabId), or tab-specific state (stored with the tab_id as the key). |
| 264 std::map<int, GURL> popup_url_; | 267 std::map<int, GURL> popup_url_; |
| 265 std::map<int, std::string> title_; | 268 std::map<int, std::string> title_; |
| 266 std::map<int, gfx::Image> icon_; | 269 std::map<int, gfx::Image> icon_; |
| 267 std::map<int, std::string> badge_text_; | 270 std::map<int, std::string> badge_text_; |
| 268 std::map<int, SkColor> badge_background_color_; | 271 std::map<int, SkColor> badge_background_color_; |
| 269 std::map<int, SkColor> badge_text_color_; | 272 std::map<int, SkColor> badge_text_color_; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 300 }; | 303 }; |
| 301 | 304 |
| 302 template<> | 305 template<> |
| 303 struct ExtensionAction::ValueTraits<int> { | 306 struct ExtensionAction::ValueTraits<int> { |
| 304 static int CreateEmpty() { | 307 static int CreateEmpty() { |
| 305 return -1; | 308 return -1; |
| 306 } | 309 } |
| 307 }; | 310 }; |
| 308 | 311 |
| 309 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_H_ | 312 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_H_ |
| OLD | NEW |