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

Unified Diff: chrome/common/extensions/api/omnibox/omnibox_handler.h

Issue 11446034: SupportsUserData and manifest handlers for Extension; use them for the Omnibox API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + manifestdata Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/extensions/api/omnibox/omnibox_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/omnibox/omnibox_handler.h
diff --git a/chrome/common/extensions/api/omnibox/omnibox_handler.h b/chrome/common/extensions/api/omnibox/omnibox_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..d3efed08886674776281a57d6eb37698d1c19209
--- /dev/null
+++ b/chrome/common/extensions/api/omnibox/omnibox_handler.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_EXTENSIONS_API_OMNIBOX_OMNIBOX_HANDLER_H_
+#define CHROME_COMMON_EXTENSIONS_API_OMNIBOX_OMNIBOX_HANDLER_H_
+
+#include <string>
+
+#include "chrome/common/extensions/extension.h"
+#include "chrome/common/extensions/manifest_handler.h"
+
+namespace extensions {
+
+class Extension;
+
+struct OmniboxInfo : public Extension::ManifestData {
+ // The Omnibox keyword for an extension.
+ std::string keyword;
+
+ // Returns the omnibox keyword for the extension.
+ static const std::string& GetKeyword(const Extension* extension);
+
+ // Returns true if the extension needs a verbose install message.
+ // TODO(yoz): This should be associated with page actions, not
+ // the omnibox.
+ static bool IsVerboseInstallMessage(const Extension* extension);
+};
+
+// Parses the "omnibox" manifest key.
+class OmniboxHandler : public ManifestHandler {
+ public:
+ OmniboxHandler();
+ virtual ~OmniboxHandler();
+
+ virtual bool Parse(const base::Value* value,
+ Extension* extension,
+ string16* error) OVERRIDE;
+};
+
+} // namespace extensions
+
+#endif // CHROME_COMMON_EXTENSIONS_API_OMNIBOX_OMNIBOX_HANDLER_H_
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/extensions/api/omnibox/omnibox_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698