Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / api / spellcheck / spellcheck_handler.h
blob53bfe32679440f846b1815f4b4c58a12fb602ce0
1 // Copyright (c) 2013 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.
5 #ifndef CHROME_COMMON_EXTENSIONS_API_SPELLCHECK_SPELLCHECK_HANDLER_H_
6 #define CHROME_COMMON_EXTENSIONS_API_SPELLCHECK_SPELLCHECK_HANDLER_H_
8 #include "extensions/common/extension.h"
9 #include "extensions/common/manifest_handler.h"
11 namespace extensions {
13 // This structure holds the information parsed by the SpellcheckHandler to be
14 // used in the SpellcheckAPI functions. It is stored on the extension.
15 struct SpellcheckDictionaryInfo : public extensions::Extension::ManifestData {
16 SpellcheckDictionaryInfo();
17 ~SpellcheckDictionaryInfo() override;
19 std::string language;
20 std::string locale;
21 std::string path;
22 std::string format;
25 // Parses the "spellcheck" manifest key.
26 class SpellcheckHandler : public ManifestHandler {
27 public:
28 SpellcheckHandler();
29 ~SpellcheckHandler() override;
31 bool Parse(Extension* extension, base::string16* error) override;
33 private:
34 const std::vector<std::string> Keys() const override;
36 DISALLOW_COPY_AND_ASSIGN(SpellcheckHandler);
39 } // namespace extensions
41 #endif // CHROME_COMMON_EXTENSIONS_API_SPELLCHECK_SPELLCHECK_HANDLER_H_