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

Unified Diff: chrome/common/extensions/extension_resource.h

Issue 2867008: Show extension icons next to their top-level context menu items.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/extension_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_resource.h
===================================================================
--- chrome/common/extensions/extension_resource.h (revision 50770)
+++ chrome/common/extensions/extension_resource.h (working copy)
@@ -5,6 +5,8 @@
#ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_RESOURCE_H_
#define CHROME_COMMON_EXTENSIONS_EXTENSION_RESOURCE_H_
+#include <string>
+
#include "base/file_path.h"
#include "base/platform_thread.h"
@@ -16,7 +18,8 @@
public:
ExtensionResource();
- ExtensionResource(const FilePath& extension_root,
+ ExtensionResource(const std::string& extension_id,
+ const FilePath& extension_root,
const FilePath& relative_path);
// Returns actual path to the resource (default or locale specific). In the
@@ -51,14 +54,20 @@
static void CheckFileAccessFromFileThread();
// Getters
+ const std::string& extension_id() const { return extension_id_; }
const FilePath& extension_root() const { return extension_root_; }
const FilePath& relative_path() const { return relative_path_; }
+ bool empty() { return extension_root().empty(); }
+
// Unit test helpers.
FilePath::StringType NormalizeSeperators(FilePath::StringType path) const;
bool ComparePathWithDefault(const FilePath& path) const;
private:
+ // The id of the extension that this resource is associated with.
+ std::string extension_id_;
+
// Extension root.
FilePath extension_root_;
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/extension_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698