| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 } | 276 } |
| 277 | 277 |
| 278 // Getter/setter for l10n message bundle. | 278 // Getter/setter for l10n message bundle. |
| 279 const ExtensionMessageBundle* message_bundle() const { | 279 const ExtensionMessageBundle* message_bundle() const { |
| 280 return message_bundle_.get(); | 280 return message_bundle_.get(); |
| 281 } | 281 } |
| 282 void set_message_bundle(ExtensionMessageBundle* message_bundle) { | 282 void set_message_bundle(ExtensionMessageBundle* message_bundle) { |
| 283 message_bundle_.reset(message_bundle); | 283 message_bundle_.reset(message_bundle); |
| 284 } | 284 } |
| 285 | 285 |
| 286 const std::string default_locale() const { return default_locale_; } |
| 287 |
| 286 // Chrome URL overrides (see ExtensionOverrideUI). | 288 // Chrome URL overrides (see ExtensionOverrideUI). |
| 287 const URLOverrideMap& GetChromeURLOverrides() const { | 289 const URLOverrideMap& GetChromeURLOverrides() const { |
| 288 return chrome_url_overrides_; | 290 return chrome_url_overrides_; |
| 289 } | 291 } |
| 290 | 292 |
| 291 // Runtime data: | 293 // Runtime data: |
| 292 // Put dynamic data about the state of a running extension below. | 294 // Put dynamic data about the state of a running extension below. |
| 293 | 295 |
| 294 // Whether the background page, if any, is ready. We don't load other | 296 // Whether the background page, if any, is ready. We don't load other |
| 295 // components until then. If there is no background page, we consider it to | 297 // 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... |
| 408 | 410 |
| 409 // URL for fetching an update manifest | 411 // URL for fetching an update manifest |
| 410 GURL update_url_; | 412 GURL update_url_; |
| 411 | 413 |
| 412 // A copy of the manifest that this extension was created from. | 414 // A copy of the manifest that this extension was created from. |
| 413 scoped_ptr<DictionaryValue> manifest_value_; | 415 scoped_ptr<DictionaryValue> manifest_value_; |
| 414 | 416 |
| 415 // Handles the l10n messages replacement and parsing. | 417 // Handles the l10n messages replacement and parsing. |
| 416 scoped_ptr<ExtensionMessageBundle> message_bundle_; | 418 scoped_ptr<ExtensionMessageBundle> message_bundle_; |
| 417 | 419 |
| 420 // Default locale for fall back. Can be empty if extension is not localized. |
| 421 std::string default_locale_; |
| 422 |
| 418 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs | 423 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs |
| 419 // which override the handling of those URLs. | 424 // which override the handling of those URLs. |
| 420 URLOverrideMap chrome_url_overrides_; | 425 URLOverrideMap chrome_url_overrides_; |
| 421 | 426 |
| 422 // Runtime data: | 427 // Runtime data: |
| 423 | 428 |
| 424 // True if the background page is ready. | 429 // True if the background page is ready. |
| 425 bool background_page_ready_; | 430 bool background_page_ready_; |
| 426 | 431 |
| 427 FRIEND_TEST(ExtensionTest, LoadPageActionHelper); | 432 FRIEND_TEST(ExtensionTest, LoadPageActionHelper); |
| 428 | 433 |
| 429 DISALLOW_COPY_AND_ASSIGN(Extension); | 434 DISALLOW_COPY_AND_ASSIGN(Extension); |
| 430 }; | 435 }; |
| 431 | 436 |
| 432 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 437 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |