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

Side by Side Diff: chrome/common/extensions/api/extension_api_feature.h

Issue 10025007: Convert tabs, windows, and extension APIs to feature system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah Created 8 years, 8 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 (c) 2012 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_API_EXTENSION_API_FEATURE_H_
6 #define CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_FEATURE_H_
7 #pragma once
8
9 #include "chrome/common/extensions/feature.h"
10
11 #include <map>
12 #include <set>
13 #include "base/memory/linked_ptr.h"
14
15 namespace extensions {
16
17 class ExtensionAPIFeature : public Feature {
18 public:
19 ExtensionAPIFeature();
20 virtual ~ExtensionAPIFeature();
21
22 std::set<std::string>* dependencies();
23
24 virtual void Parse(const DictionaryValue* value) OVERRIDE;
25
26 // Returns a child feature with the given name.
27 // TODO(aa): This will return NULL if the child is empty. It would be better
28 // to generate a feature on the fly for such children, but that will require
29 // reworking ownership a bit since callers currently do not expect to ever
30 // take ownership of the values returned here.
31 Feature* GetChild(const std::string& name) const;
32
33 private:
34 std::set<std::string> dependencies_;
35
36 typedef std::map<std::string,
37 linked_ptr<ExtensionAPIFeature> > ChildFeatureMap;
38 ChildFeatureMap child_features_;
39 };
40
41 } // namespace extensions
42
43 #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_FEATURE_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/extension_api.cc ('k') | chrome/common/extensions/api/extension_api_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698