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

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

Issue 501136: Merge 34812 - Add the rightclick context menu for Browser actions and Page... (Closed) Base URL: svn://chrome-svn/chrome/branches/249/src/
Patch Set: Created 11 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/chrome.gyp ('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) 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // Expects base64 encoded |input| and formats into |output| including 170 // Expects base64 encoded |input| and formats into |output| including
171 // the appropriate header & footer. 171 // the appropriate header & footer.
172 static bool FormatPEMForFileOutput(const std::string input, 172 static bool FormatPEMForFileOutput(const std::string input,
173 std::string* output, bool is_public); 173 std::string* output, bool is_public);
174 174
175 // Determine whether |new_extension| has increased privileges compared to 175 // Determine whether |new_extension| has increased privileges compared to
176 // |old_extension|. 176 // |old_extension|.
177 static bool IsPrivilegeIncrease(Extension* old_extension, 177 static bool IsPrivilegeIncrease(Extension* old_extension,
178 Extension* new_extension); 178 Extension* new_extension);
179 179
180 // Given an extension and icon size, read it if present and decode it into
181 // result.
182 static void DecodeIcon(Extension* extension,
183 Icons icon_size,
184 scoped_ptr<SkBitmap>* result);
185
186 // Given an icon_path and icon size, read it if present and decode it into
187 // result.
188 static void DecodeIconFromPath(const FilePath& icon_path,
189 Icons icon_size,
190 scoped_ptr<SkBitmap>* result);
191
180 // Initialize the extension from a parsed manifest. 192 // Initialize the extension from a parsed manifest.
181 // If |require_id| is true, will return an error if the "id" key is missing 193 // If |require_id| is true, will return an error if the "id" key is missing
182 // from the value. 194 // from the value.
183 bool InitFromValue(const DictionaryValue& value, bool require_id, 195 bool InitFromValue(const DictionaryValue& value, bool require_id,
184 std::string* error); 196 std::string* error);
185 197
186 const FilePath& path() const { return path_; } 198 const FilePath& path() const { return path_; }
187 void set_path(const FilePath& path) { path_ = path; } 199 void set_path(const FilePath& path) { path_ = path; }
188 const GURL& url() const { return extension_url_; } 200 const GURL& url() const { return extension_url_; }
189 const Location location() const { return location_; } 201 const Location location() const { return location_; }
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 423
412 // True if the background page is ready. 424 // True if the background page is ready.
413 bool background_page_ready_; 425 bool background_page_ready_;
414 426
415 FRIEND_TEST(ExtensionTest, LoadPageActionHelper); 427 FRIEND_TEST(ExtensionTest, LoadPageActionHelper);
416 428
417 DISALLOW_COPY_AND_ASSIGN(Extension); 429 DISALLOW_COPY_AND_ASSIGN(Extension);
418 }; 430 };
419 431
420 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 432 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698