1 // Copyright 2014 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_MANIFEST_HANDLERS_EXTENSION_ACTION_HANDLER_H_ 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTENSION_ACTION_HANDLER_H_ 7 8 #include <string> 9 10 #include "base/macros.h" 11 #include "extensions/common/manifest_handler.h" 12 13 namespace extensions { 14 15 // Parses the "page_action" and "browser_action" manifest keys. 16 class ExtensionActionHandler : public ManifestHandler { 17 public: 18 ExtensionActionHandler(); 19 ~ExtensionActionHandler() override; 20 21 bool Parse(Extension* extension, base::string16* error) override; 22 bool Validate(const Extension* extension, 23 std::string* error, 24 std::vector<InstallWarning>* warnings) const override; 25 26 private: 27 bool AlwaysParseForType(Manifest::Type type) const override; 28 base::span<const char* const> Keys() const override; 29 30 DISALLOW_COPY_AND_ASSIGN(ExtensionActionHandler); 31 }; 32 33 } // namespace extensions 34 35 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTENSION_ACTION_HANDLER_H_ 36