Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Side by Side Diff: chrome/common/extensions/extension.h

Issue 11644057: Move BrowserAction out of Extension (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_ungoop_extension_action
Patch Set: Latest master for CQ Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <algorithm> 8 #include <algorithm>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/file_path.h" 16 #include "base/file_path.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/hash_tables.h" 18 #include "base/hash_tables.h"
19 #include "base/memory/linked_ptr.h" 19 #include "base/memory/linked_ptr.h"
20 #include "base/memory/ref_counted.h" 20 #include "base/memory/ref_counted.h"
21 #include "base/memory/scoped_ptr.h" 21 #include "base/memory/scoped_ptr.h"
22 #include "base/synchronization/lock.h" 22 #include "base/synchronization/lock.h"
23 #include "base/threading/thread_checker.h" 23 #include "base/threading/thread_checker.h"
24 #include "chrome/common/extensions/api/extension_action/action_info.h"
25 #include "chrome/common/extensions/extension_constants.h" 24 #include "chrome/common/extensions/extension_constants.h"
26 #include "chrome/common/extensions/extension_icon_set.h" 25 #include "chrome/common/extensions/extension_icon_set.h"
27 #include "chrome/common/extensions/permissions/api_permission.h" 26 #include "chrome/common/extensions/permissions/api_permission.h"
28 #include "chrome/common/extensions/permissions/api_permission_set.h" 27 #include "chrome/common/extensions/permissions/api_permission_set.h"
29 #include "chrome/common/extensions/permissions/permission_message.h" 28 #include "chrome/common/extensions/permissions/permission_message.h"
30 #include "chrome/common/extensions/user_script.h" 29 #include "chrome/common/extensions/user_script.h"
31 #include "extensions/common/url_pattern.h" 30 #include "extensions/common/url_pattern.h"
32 #include "extensions/common/url_pattern_set.h" 31 #include "extensions/common/url_pattern_set.h"
33 #include "googleurl/src/gurl.h" 32 #include "googleurl/src/gurl.h"
34 #include "ui/base/accelerators/accelerator.h" 33 #include "ui/base/accelerators/accelerator.h"
35 #include "ui/gfx/size.h" 34 #include "ui/gfx/size.h"
36 35
37 class ExtensionAction; 36 class ExtensionAction;
38 class ExtensionResource; 37 class ExtensionResource;
39 class SkBitmap; 38 class SkBitmap;
40 class Version; 39 class Version;
41 40
42 namespace base { 41 namespace base {
43 class DictionaryValue; 42 class DictionaryValue;
44 class ListValue; 43 class ListValue;
45 } 44 }
46 45
47 namespace gfx { 46 namespace gfx {
48 class ImageSkia; 47 class ImageSkia;
49 } 48 }
50 49
51 FORWARD_DECLARE_TEST(TabStripModelTest, Apps); 50 FORWARD_DECLARE_TEST(TabStripModelTest, Apps);
52 51
53 namespace extensions { 52 namespace extensions {
54 53 struct ActionInfo;
55 class Manifest; 54 class Manifest;
56 class PermissionSet; 55 class PermissionSet;
57 56
58 typedef std::set<std::string> OAuth2Scopes; 57 typedef std::set<std::string> OAuth2Scopes;
59 58
60 // Represents a Chrome extension. 59 // Represents a Chrome extension.
61 class Extension : public base::RefCountedThreadSafe<Extension> { 60 class Extension : public base::RefCountedThreadSafe<Extension> {
62 public: 61 public:
63 struct InstallWarning; 62 struct InstallWarning;
64 struct ManifestData; 63 struct ManifestData;
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 // In pseudocode, returns 598 // In pseudocode, returns
600 // base::Base64Encode(RSAPrivateKey(pem_file).ExportPublicKey()). 599 // base::Base64Encode(RSAPrivateKey(pem_file).ExportPublicKey()).
601 const std::string& public_key() const { return public_key_; } 600 const std::string& public_key() const { return public_key_; }
602 const std::string& description() const { return description_; } 601 const std::string& description() const { return description_; }
603 int manifest_version() const { return manifest_version_; } 602 int manifest_version() const { return manifest_version_; }
604 bool converted_from_user_script() const { 603 bool converted_from_user_script() const {
605 return converted_from_user_script_; 604 return converted_from_user_script_;
606 } 605 }
607 const UserScriptList& content_scripts() const { return content_scripts_; } 606 const UserScriptList& content_scripts() const { return content_scripts_; }
608 const ActionInfo* page_action_info() const { return page_action_info_.get(); } 607 const ActionInfo* page_action_info() const { return page_action_info_.get(); }
609 const ActionInfo* browser_action_info() const {
610 return browser_action_info_.get();
611 }
612 const ActionInfo* system_indicator_info() const { 608 const ActionInfo* system_indicator_info() const {
613 return system_indicator_info_.get(); 609 return system_indicator_info_.get();
614 } 610 }
615 const std::vector<PluginInfo>& plugins() const { return plugins_; } 611 const std::vector<PluginInfo>& plugins() const { return plugins_; }
616 const std::vector<NaClModuleInfo>& nacl_modules() const { 612 const std::vector<NaClModuleInfo>& nacl_modules() const {
617 return nacl_modules_; 613 return nacl_modules_;
618 } 614 }
619 bool has_background_page() const { 615 bool has_background_page() const {
620 return background_url_.is_valid() || !background_scripts_.empty(); 616 return background_url_.is_valid() || !background_scripts_.empty();
621 } 617 }
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 // True if the extension was generated from a user script. (We show slightly 948 // True if the extension was generated from a user script. (We show slightly
953 // different UI if so). 949 // different UI if so).
954 bool converted_from_user_script_; 950 bool converted_from_user_script_;
955 951
956 // Paths to the content scripts the extension contains. 952 // Paths to the content scripts the extension contains.
957 UserScriptList content_scripts_; 953 UserScriptList content_scripts_;
958 954
959 // The extension's page action, if any. 955 // The extension's page action, if any.
960 scoped_ptr<ActionInfo> page_action_info_; 956 scoped_ptr<ActionInfo> page_action_info_;
961 957
962 // The extension's browser action, if any.
963 scoped_ptr<ActionInfo> browser_action_info_;
964
965 // The extension's system indicator, if any. 958 // The extension's system indicator, if any.
966 scoped_ptr<ActionInfo> system_indicator_info_; 959 scoped_ptr<ActionInfo> system_indicator_info_;
967 960
968 // Optional list of NPAPI plugins and associated properties. 961 // Optional list of NPAPI plugins and associated properties.
969 std::vector<PluginInfo> plugins_; 962 std::vector<PluginInfo> plugins_;
970 963
971 // Optional list of NaCl modules and associated properties. 964 // Optional list of NaCl modules and associated properties.
972 std::vector<NaClModuleInfo> nacl_modules_; 965 std::vector<NaClModuleInfo> nacl_modules_;
973 966
974 // Optional list of extension pages that are sandboxed (served from a unique 967 // Optional list of extension pages that are sandboxed (served from a unique
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 1130
1138 UpdatedExtensionPermissionsInfo( 1131 UpdatedExtensionPermissionsInfo(
1139 const Extension* extension, 1132 const Extension* extension,
1140 const PermissionSet* permissions, 1133 const PermissionSet* permissions,
1141 Reason reason); 1134 Reason reason);
1142 }; 1135 };
1143 1136
1144 } // namespace extensions 1137 } // namespace extensions
1145 1138
1146 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1139 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/omnibox/omnibox_handler.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698