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

Side by Side Diff: extensions/common/manifest_handlers/launcher_page_info.h

Issue 489753002: Added proper extension manifest parser for launcher_page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Blank line. Created 6 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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 EXTENSIONS_COMMON_MANIFEST_HANDLERS_LAUNCHER_PAGE_INFO_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_LAUNCHER_PAGE_INFO_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/strings/string16.h"
12 #include "extensions/common/extension.h"
13 #include "extensions/common/manifest_handler.h"
14
15 namespace extensions {
16
17 struct LauncherPageInfo : public Extension::ManifestData {
18 // The page URL.
19 std::string page;
20 };
21
22 // Parses the "launcher_page" manifest key.
23 class LauncherPageHandler : public ManifestHandler {
24 public:
25 LauncherPageHandler();
26 virtual ~LauncherPageHandler();
27
28 // Gets the LauncherPageInfo for a given |extension|.
29 static LauncherPageInfo* GetInfo(const Extension* extension);
30
31 // ManifestHandler overrides:
32 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE;
33 virtual bool Validate(const Extension* extension,
34 std::string* error,
35 std::vector<InstallWarning>* warnings) const OVERRIDE;
36
37 private:
38 virtual const std::vector<std::string> Keys() const OVERRIDE;
39
40 DISALLOW_COPY_AND_ASSIGN(LauncherPageHandler);
41 };
42
43 } // namespace extensions
44
45 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_LAUNCHER_PAGE_INFO_H_
OLDNEW
« no previous file with comments | « extensions/common/manifest_constants.cc ('k') | extensions/common/manifest_handlers/launcher_page_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698