Explicitly add python-numpy dependency to install-build-deps.
[chromium-blink-merge.git] / extensions / common / manifest_handlers / webview_info.h
blob2cd501efb6579ba591c462f23976566939be0d36
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_WEBVIEW_INFO_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEBVIEW_INFO_H_
8 #include <string>
10 #include "base/memory/scoped_vector.h"
11 #include "extensions/common/extension.h"
12 #include "extensions/common/manifest_handler.h"
14 namespace extensions {
16 class PartitionItem;
18 // A class to hold the <webview> accessible extension resources
19 // that may be specified in the manifest of an extension using the
20 // "webview" key.
21 class WebviewInfo : public Extension::ManifestData {
22 public:
23 // Define out of line constructor/destructor to please Clang.
24 WebviewInfo();
25 ~WebviewInfo() override;
27 // Returns true if the specified resource is web accessible.
28 static bool IsResourceWebviewAccessible(const Extension* extension,
29 const std::string& partition_id,
30 const std::string& relative_path);
32 void AddPartitionItem(scoped_ptr<PartitionItem> item);
34 private:
35 ScopedVector<PartitionItem> partition_items_;
38 // Parses the "webview" manifest key.
39 class WebviewHandler : public ManifestHandler {
40 public:
41 WebviewHandler();
42 ~WebviewHandler() override;
44 bool Parse(Extension* extension, base::string16* error) override;
46 private:
47 const std::vector<std::string> Keys() const override;
49 DISALLOW_COPY_AND_ASSIGN(WebviewHandler);
52 } // namespace extensions
54 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_WEBVIEW_INFO_H_