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

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

Issue 174036: Get rid of the extension's "Current Version" file. (Closed)
Patch Set: merge conflicts Created 11 years, 4 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) 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // the browser might load (like themes and page action icons). 230 // the browser might load (like themes and page action icons).
231 std::set<FilePath> GetBrowserImages(); 231 std::set<FilePath> GetBrowserImages();
232 232
233 // Calculates and returns the permission class this extension is in. 233 // Calculates and returns the permission class this extension is in.
234 PermissionClass GetPermissionClass(); 234 PermissionClass GetPermissionClass();
235 235
236 // Returns an absolute path to the given icon inside of the extension. Returns 236 // Returns an absolute path to the given icon inside of the extension. Returns
237 // an empty FilePath if the extension does not have that icon. 237 // an empty FilePath if the extension does not have that icon.
238 FilePath GetIconPath(Icons icon); 238 FilePath GetIconPath(Icons icon);
239 239
240 const DictionaryValue* manifest_value() const {
241 return manifest_value_.get();
242 }
243
240 // Returns a list of all locales supported by the extension. 244 // Returns a list of all locales supported by the extension.
241 const std::set<std::string>& supported_locales() const { 245 const std::set<std::string>& supported_locales() const {
242 return supported_locales_; 246 return supported_locales_;
243 } 247 }
244 // Add locale to the list of supported locales. 248 // Add locale to the list of supported locales.
245 void AddSupportedLocale(const std::string& supported_locale) { 249 void AddSupportedLocale(const std::string& supported_locale) {
246 supported_locales_.insert(supported_locale); 250 supported_locales_.insert(supported_locale);
247 } 251 }
248 252
249 // Getter/setter for a default_locale_. 253 // Getter/setter for a default_locale_.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 360
357 // The sites this extension has permission to talk to (using XHR, etc). 361 // The sites this extension has permission to talk to (using XHR, etc).
358 std::vector<URLPattern> host_permissions_; 362 std::vector<URLPattern> host_permissions_;
359 363
360 // The paths to the icons the extension contains mapped by their width. 364 // The paths to the icons the extension contains mapped by their width.
361 std::map<int, std::string> icons_; 365 std::map<int, std::string> icons_;
362 366
363 // URL for fetching an update manifest 367 // URL for fetching an update manifest
364 GURL update_url_; 368 GURL update_url_;
365 369
366 // List of all locales extension supports. 370 // A copy of the manifest that this extension was created from.
371 scoped_ptr<DictionaryValue> manifest_value_;
372
373 // List of all locales extension supports.
367 std::set<std::string> supported_locales_; 374 std::set<std::string> supported_locales_;
368 375
369 // Default locale, used for fallback. 376 // Default locale, used for fallback.
370 std::string default_locale_; 377 std::string default_locale_;
371 378
372 // Runtime data: 379 // Runtime data:
373 380
374 // True if the background page is ready. 381 // True if the background page is ready.
375 bool background_page_ready_; 382 bool background_page_ready_;
376 383
377 FRIEND_TEST(ExtensionTest, LoadPageActionHelper); 384 FRIEND_TEST(ExtensionTest, LoadPageActionHelper);
378 385
379 DISALLOW_COPY_AND_ASSIGN(Extension); 386 DISALLOW_COPY_AND_ASSIGN(Extension);
380 }; 387 };
381 388
382 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 389 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_service_unittest.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698