| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_COMMON_EXTENSIONS_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 } | 267 } |
| 268 | 268 |
| 269 // Getter/setter for l10n message bundle. | 269 // Getter/setter for l10n message bundle. |
| 270 const ExtensionMessageBundle* message_bundle() const { | 270 const ExtensionMessageBundle* message_bundle() const { |
| 271 return message_bundle_.get(); | 271 return message_bundle_.get(); |
| 272 } | 272 } |
| 273 void set_message_bundle(ExtensionMessageBundle* message_bundle) { | 273 void set_message_bundle(ExtensionMessageBundle* message_bundle) { |
| 274 message_bundle_.reset(message_bundle); | 274 message_bundle_.reset(message_bundle); |
| 275 } | 275 } |
| 276 | 276 |
| 277 const std::string default_locale() const { return default_locale_; } |
| 278 |
| 277 // Chrome URL overrides (see ExtensionOverrideUI). | 279 // Chrome URL overrides (see ExtensionOverrideUI). |
| 278 const URLOverrideMap& GetChromeURLOverrides() const { | 280 const URLOverrideMap& GetChromeURLOverrides() const { |
| 279 return chrome_url_overrides_; | 281 return chrome_url_overrides_; |
| 280 } | 282 } |
| 281 | 283 |
| 282 // Runtime data: | 284 // Runtime data: |
| 283 // Put dynamic data about the state of a running extension below. | 285 // Put dynamic data about the state of a running extension below. |
| 284 | 286 |
| 285 // Whether the background page, if any, is ready. We don't load other | 287 // Whether the background page, if any, is ready. We don't load other |
| 286 // components until then. If there is no background page, we consider it to | 288 // components until then. If there is no background page, we consider it to |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 401 |
| 400 // URL for fetching an update manifest | 402 // URL for fetching an update manifest |
| 401 GURL update_url_; | 403 GURL update_url_; |
| 402 | 404 |
| 403 // A copy of the manifest that this extension was created from. | 405 // A copy of the manifest that this extension was created from. |
| 404 scoped_ptr<DictionaryValue> manifest_value_; | 406 scoped_ptr<DictionaryValue> manifest_value_; |
| 405 | 407 |
| 406 // Handles the l10n messages replacement and parsing. | 408 // Handles the l10n messages replacement and parsing. |
| 407 scoped_ptr<ExtensionMessageBundle> message_bundle_; | 409 scoped_ptr<ExtensionMessageBundle> message_bundle_; |
| 408 | 410 |
| 411 // Default locale for fall back. Can be empty if extension is not localized. |
| 412 std::string default_locale_; |
| 413 |
| 409 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs | 414 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs |
| 410 // which override the handling of those URLs. | 415 // which override the handling of those URLs. |
| 411 URLOverrideMap chrome_url_overrides_; | 416 URLOverrideMap chrome_url_overrides_; |
| 412 | 417 |
| 413 // Runtime data: | 418 // Runtime data: |
| 414 | 419 |
| 415 // True if the background page is ready. | 420 // True if the background page is ready. |
| 416 bool background_page_ready_; | 421 bool background_page_ready_; |
| 417 | 422 |
| 418 FRIEND_TEST(ExtensionTest, LoadPageActionHelper); | 423 FRIEND_TEST(ExtensionTest, LoadPageActionHelper); |
| 419 | 424 |
| 420 DISALLOW_COPY_AND_ASSIGN(Extension); | 425 DISALLOW_COPY_AND_ASSIGN(Extension); |
| 421 }; | 426 }; |
| 422 | 427 |
| 423 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 428 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |