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

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

Issue 2206001: Merge 48149 - Relanding 48042.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/408/src/
Patch Set: Created 10 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/common/extensions/extension.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // result. In the browser process, this will DCHECK if not called on the 202 // result. In the browser process, this will DCHECK if not called on the
203 // file thread. To easily load extension images on the UI thread, see 203 // file thread. To easily load extension images on the UI thread, see
204 // ImageLoadingTracker. 204 // ImageLoadingTracker.
205 static void DecodeIconFromPath(const FilePath& icon_path, 205 static void DecodeIconFromPath(const FilePath& icon_path,
206 Icons icon_size, 206 Icons icon_size,
207 scoped_ptr<SkBitmap>* result); 207 scoped_ptr<SkBitmap>* result);
208 208
209 // Returns the base extension url for a given |extension_id|. 209 // Returns the base extension url for a given |extension_id|.
210 static GURL GetBaseURLFromExtensionId(const std::string& extension_id); 210 static GURL GetBaseURLFromExtensionId(const std::string& extension_id);
211 211
212 // Returns whether the browser has apps enabled (either as the default or if
213 // it was explictly turned on via a command line switch).
214 static bool AppsAreEnabled();
215
212 // Initialize the extension from a parsed manifest. 216 // Initialize the extension from a parsed manifest.
213 // Usually, the id of an extension is generated by the "key" property of 217 // Usually, the id of an extension is generated by the "key" property of
214 // its manifest, but if |require_key| is |false|, a temporary ID will be 218 // its manifest, but if |require_key| is |false|, a temporary ID will be
215 // generated based on the path. 219 // generated based on the path.
216 bool InitFromValue(const DictionaryValue& value, bool require_key, 220 bool InitFromValue(const DictionaryValue& value, bool require_key,
217 std::string* error); 221 std::string* error);
218 222
219 const FilePath& path() const { return path_; } 223 const FilePath& path() const { return path_; }
220 void set_path(const FilePath& path) { path_ = path; } 224 void set_path(const FilePath& path) { path_ = path; }
221 const GURL& url() const { return extension_url_; } 225 const GURL& url() const { return extension_url_; }
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 scoped_ptr<DictionaryValue> extension_manifest; 558 scoped_ptr<DictionaryValue> extension_manifest;
555 std::string extension_id; 559 std::string extension_id;
556 FilePath extension_path; 560 FilePath extension_path;
557 Extension::Location extension_location; 561 Extension::Location extension_location;
558 562
559 private: 563 private:
560 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); 564 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo);
561 }; 565 };
562 566
563 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 567 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698