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

Side by Side Diff: chrome/browser/extensions/component_loader.h

Issue 11411308: Enable script bubble by default on all but mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Everything passes Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_COMPONENT_LOADER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Parse the given JSON manifest. Returns NULL if it cannot be parsed, or if 77 // Parse the given JSON manifest. Returns NULL if it cannot be parsed, or if
78 // if the result is not a DictionaryValue. 78 // if the result is not a DictionaryValue.
79 DictionaryValue* ParseManifest(const std::string& manifest_contents) const; 79 DictionaryValue* ParseManifest(const std::string& manifest_contents) const;
80 80
81 // Clear the list of registered extensions. 81 // Clear the list of registered extensions.
82 void ClearAllRegistered(); 82 void ClearAllRegistered();
83 83
84 // Reloads a registered component extension. 84 // Reloads a registered component extension.
85 void Reload(const std::string& extension_id); 85 void Reload(const std::string& extension_id);
86 86
87 // Adds the "Script Bubble" component extension, which puts an icon in the
88 // omnibox indiciating the number of extensions running script in a tab.
89 void AddScriptBubble();
90
91 // Returns the extension previously added by AddScriptBubble(), if any.
92 const Extension* GetScriptBubble() const;
93
94 private: 87 private:
95 // Information about a registered component extension. 88 // Information about a registered component extension.
96 struct ComponentExtensionInfo { 89 struct ComponentExtensionInfo {
97 ComponentExtensionInfo(const DictionaryValue* manifest, 90 ComponentExtensionInfo(const DictionaryValue* manifest,
98 const FilePath& root_directory); 91 const FilePath& root_directory);
99 92
100 // The parsed contents of the extensions's manifest file. 93 // The parsed contents of the extensions's manifest file.
101 const DictionaryValue* manifest; 94 const DictionaryValue* manifest;
102 95
103 // Directory where the extension is stored. 96 // Directory where the extension is stored.
(...skipping 25 matching lines...) Expand all
129 PrefService* local_state_; 122 PrefService* local_state_;
130 123
131 ExtensionServiceInterface* extension_service_; 124 ExtensionServiceInterface* extension_service_;
132 125
133 // List of registered component extensions (see Extension::Location). 126 // List of registered component extensions (see Extension::Location).
134 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; 127 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions;
135 RegisteredComponentExtensions component_extensions_; 128 RegisteredComponentExtensions component_extensions_;
136 129
137 PrefChangeRegistrar pref_change_registrar_; 130 PrefChangeRegistrar pref_change_registrar_;
138 131
139 std::string script_bubble_id_;
140
141 DISALLOW_COPY_AND_ASSIGN(ComponentLoader); 132 DISALLOW_COPY_AND_ASSIGN(ComponentLoader);
142 }; 133 };
143 134
144 } // namespace extensions 135 } // namespace extensions
145 136
146 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ 137 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698