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

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

Issue 2618493002: Chrome app manifest support for action handlers. (Closed)
Patch Set: Make //components/version_info:version_info dep explicit Created 3 years, 10 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
OLDNEW
(Empty)
1 // Copyright 2017 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_ACTION_HANDLERS_HANDLER_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_ACTION_HANDLERS_HANDLER_H_
7
8 #include <set>
9
10 #include "base/macros.h"
11 #include "extensions/common/api/app_runtime.h"
12 #include "extensions/common/extension.h"
13 #include "extensions/common/manifest_handler.h"
14
15 namespace extensions {
16
17 struct ActionHandlersInfo : public Extension::ManifestData {
18 // Returns true if the given |extension| has an action handler for
19 // |action_type|.
20 static bool HasActionHandler(const Extension* extension,
21 api::app_runtime::ActionType action_type);
22
23 ActionHandlersInfo();
24 ~ActionHandlersInfo() override;
25
26 std::set<api::app_runtime::ActionType> action_handlers;
27 };
28
29 // Parses the "action_handlers" manifest key.
30 class ActionHandlersHandler : public ManifestHandler {
31 public:
32 ActionHandlersHandler();
33 ~ActionHandlersHandler() override;
34
35 bool Parse(Extension* extension, base::string16* error) override;
36
37 private:
38 const std::vector<std::string> Keys() const override;
39
40 DISALLOW_COPY_AND_ASSIGN(ActionHandlersHandler);
41 };
42
43 } // namespace extensions
44
45 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_ACTION_HANDLERS_HANDLER_H_
OLDNEW
« no previous file with comments | « extensions/common/manifest_constants.cc ('k') | extensions/common/manifest_handlers/action_handlers_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698