Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / extensions / common / manifest_handlers / launcher_page_info.h
blob96fe1b4ca5059e69cfa036311a08d1b9ed1bfea1
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.
5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_LAUNCHER_PAGE_INFO_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_LAUNCHER_PAGE_INFO_H_
8 #include <string>
9 #include <vector>
11 #include "base/strings/string16.h"
12 #include "extensions/common/extension.h"
13 #include "extensions/common/manifest_handler.h"
15 namespace extensions {
17 struct LauncherPageInfo : public Extension::ManifestData {
18 // The page URL.
19 std::string page;
22 // Parses the "launcher_page" manifest key.
23 class LauncherPageHandler : public ManifestHandler {
24 public:
25 LauncherPageHandler();
26 ~LauncherPageHandler() override;
28 // Gets the LauncherPageInfo for a given |extension|.
29 static LauncherPageInfo* GetInfo(const Extension* extension);
31 // ManifestHandler overrides:
32 bool Parse(Extension* extension, base::string16* error) override;
33 bool Validate(const Extension* extension,
34 std::string* error,
35 std::vector<InstallWarning>* warnings) const override;
37 private:
38 const std::vector<std::string> Keys() const override;
40 DISALLOW_COPY_AND_ASSIGN(LauncherPageHandler);
43 } // namespace extensions
45 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_LAUNCHER_PAGE_INFO_H_