OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
16 #include "base/memory/linked_ptr.h" | 16 #include "base/memory/linked_ptr.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
| 20 #include "chrome/browser/intents/web_intent_data.h" |
20 #include "chrome/common/extensions/extension_constants.h" | 21 #include "chrome/common/extensions/extension_constants.h" |
21 #include "chrome/common/extensions/extension_icon_set.h" | 22 #include "chrome/common/extensions/extension_icon_set.h" |
22 #include "chrome/common/extensions/extension_permission_set.h" | 23 #include "chrome/common/extensions/extension_permission_set.h" |
23 #include "chrome/common/extensions/user_script.h" | 24 #include "chrome/common/extensions/user_script.h" |
24 #include "chrome/common/extensions/url_pattern.h" | 25 #include "chrome/common/extensions/url_pattern.h" |
25 #include "chrome/common/extensions/url_pattern_set.h" | 26 #include "chrome/common/extensions/url_pattern_set.h" |
26 #include "googleurl/src/gurl.h" | 27 #include "googleurl/src/gurl.h" |
27 #include "ui/gfx/size.h" | 28 #include "ui/gfx/size.h" |
28 | 29 |
29 class ExtensionAction; | 30 class ExtensionAction; |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 return manifest_value_.get(); | 527 return manifest_value_.get(); |
527 } | 528 } |
528 const std::string default_locale() const { return default_locale_; } | 529 const std::string default_locale() const { return default_locale_; } |
529 const URLOverrideMap& GetChromeURLOverrides() const { | 530 const URLOverrideMap& GetChromeURLOverrides() const { |
530 return chrome_url_overrides_; | 531 return chrome_url_overrides_; |
531 } | 532 } |
532 const std::string omnibox_keyword() const { return omnibox_keyword_; } | 533 const std::string omnibox_keyword() const { return omnibox_keyword_; } |
533 bool incognito_split_mode() const { return incognito_split_mode_; } | 534 bool incognito_split_mode() const { return incognito_split_mode_; } |
534 bool offline_enabled() const { return offline_enabled_; } | 535 bool offline_enabled() const { return offline_enabled_; } |
535 const std::vector<TtsVoice>& tts_voices() const { return tts_voices_; } | 536 const std::vector<TtsVoice>& tts_voices() const { return tts_voices_; } |
| 537 const std::vector<WebIntentData>& intents() const { return intents_; } |
536 | 538 |
537 bool wants_file_access() const { return wants_file_access_; } | 539 bool wants_file_access() const { return wants_file_access_; } |
538 int creation_flags() const { return creation_flags_; } | 540 int creation_flags() const { return creation_flags_; } |
539 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } | 541 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } |
540 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } | 542 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } |
541 | 543 |
542 const std::string& content_security_policy() const { | 544 const std::string& content_security_policy() const { |
543 return content_security_policy_; | 545 return content_security_policy_; |
544 } | 546 } |
545 | 547 |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 // containers like panels and windows. | 838 // containers like panels and windows. |
837 int launch_width_; | 839 int launch_width_; |
838 int launch_height_; | 840 int launch_height_; |
839 | 841 |
840 // The Omnibox keyword for this extension, or empty if there is none. | 842 // The Omnibox keyword for this extension, or empty if there is none. |
841 std::string omnibox_keyword_; | 843 std::string omnibox_keyword_; |
842 | 844 |
843 // List of text-to-speech voices that this extension provides, if any. | 845 // List of text-to-speech voices that this extension provides, if any. |
844 std::vector<TtsVoice> tts_voices_; | 846 std::vector<TtsVoice> tts_voices_; |
845 | 847 |
| 848 // List of intents that this extension provides, if any. |
| 849 std::vector<WebIntentData> intents_; |
| 850 |
846 // Whether the extension has host permissions or user script patterns that | 851 // Whether the extension has host permissions or user script patterns that |
847 // imply access to file:/// scheme URLs (the user may not have actually | 852 // imply access to file:/// scheme URLs (the user may not have actually |
848 // granted it that access). | 853 // granted it that access). |
849 bool wants_file_access_; | 854 bool wants_file_access_; |
850 | 855 |
851 // The flags that were passed to InitFromValue. | 856 // The flags that were passed to InitFromValue. |
852 int creation_flags_; | 857 int creation_flags_; |
853 | 858 |
854 // The Content-Security-Policy for this extension. Extensions can use | 859 // The Content-Security-Policy for this extension. Extensions can use |
855 // Content-Security-Policies to mitigate cross-site scripting and other | 860 // Content-Security-Policies to mitigate cross-site scripting and other |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 // only contain the removed permissions. | 936 // only contain the removed permissions. |
932 const ExtensionPermissionSet* permissions; | 937 const ExtensionPermissionSet* permissions; |
933 | 938 |
934 UpdatedExtensionPermissionsInfo( | 939 UpdatedExtensionPermissionsInfo( |
935 const Extension* extension, | 940 const Extension* extension, |
936 const ExtensionPermissionSet* permissions, | 941 const ExtensionPermissionSet* permissions, |
937 Reason reason); | 942 Reason reason); |
938 }; | 943 }; |
939 | 944 |
940 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 945 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |