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

Unified Diff: extensions/common/manifest_handlers/file_handler_info.h

Issue 1872223002: Add verbs API to file handlers. Modify the Chrome OS UI so that it displayes the internationalized … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments mentioned by fukino@. Created 4 years, 8 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
Index: extensions/common/manifest_handlers/file_handler_info.h
diff --git a/extensions/common/manifest_handlers/file_handler_info.h b/extensions/common/manifest_handlers/file_handler_info.h
index 90de31c3069cea530f47d61ce837a2c4868379a6..7b3829cd2b2eeb5641ff8f50e0860eabf9bf6fe8 100644
--- a/extensions/common/manifest_handlers/file_handler_info.h
+++ b/extensions/common/manifest_handlers/file_handler_info.h
@@ -31,6 +31,9 @@ struct FileHandlerInfo {
// True if the handler can manage directories.
bool include_directories;
+
+ // A verb describing the intent of the handler.
+ std::string verb;
};
typedef std::vector<FileHandlerInfo> FileHandlersInfo;
@@ -58,6 +61,22 @@ class FileHandlersParser : public ManifestHandler {
DISALLOW_COPY_AND_ASSIGN(FileHandlersParser);
};
+namespace file_handler_verbs {
+
+// Supported verbs for file handlers.
+extern const char kOpenWith[];
+extern const char kAddTo[];
+extern const char kPackWith[];
+
+bool IsSupportedVerb(const std::string& verb);
+
+// Gets the internationlized title for an extension based on the extension name
+// and the associated handler verb.
+base::string16 GetTitleForExtensionAndVerb(const std::string& extension_name,
+ const std::string& handler_verb);
+
+} // namespace file_handler_verbs
+
} // namespace extensions
#endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_FILE_HANDLER_INFO_H_

Powered by Google App Engine
This is Rietveld 408576698