| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_COMMON_EXTENSIONS_WEB_INTENTS_HANDLER_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_WEB_INTENTS_HANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "chrome/common/extensions/extension.h" |
| 11 #include "chrome/common/extensions/manifest_handler.h" |
| 12 |
| 13 namespace webkit_glue { |
| 14 struct WebIntentServiceData; |
| 15 } |
| 16 |
| 17 namespace extensions { |
| 18 |
| 19 typedef std::vector<webkit_glue::WebIntentServiceData> WebIntentServiceDataList; |
| 20 |
| 21 // A structure to hold the parsed web intent service data list |
| 22 // that may be specified in the manifest of an extension using |
| 23 // "intents" key. |
| 24 struct WebIntentsInfo : public Extension::ManifestData { |
| 25 // Define out of line constructor/destructor to please Clang. |
| 26 WebIntentsInfo(); |
| 27 virtual ~WebIntentsInfo(); |
| 28 |
| 29 static const WebIntentServiceDataList& GetIntentsServices( |
| 30 const Extension* extension); |
| 31 |
| 32 // List of intents services that the extension provides, if any. |
| 33 WebIntentServiceDataList intents_services_; |
| 34 }; |
| 35 |
| 36 // Parses the "intents" manifest key. |
| 37 class WebIntentsHandler : public ManifestHandler { |
| 38 public: |
| 39 WebIntentsHandler(); |
| 40 virtual ~WebIntentsHandler(); |
| 41 |
| 42 virtual bool Parse(const base::Value* value, |
| 43 Extension* extension, |
| 44 string16* error) OVERRIDE; |
| 45 }; |
| 46 |
| 47 } // namespace extensions |
| 48 |
| 49 #endif // CHROME_COMMON_EXTENSIONS_WEB_INTENTS_HANDLER_H_ |
| OLD | NEW |