Roll src/third_party/WebKit a3b4a2e:7441784 (svn 202551:202552)
[chromium-blink-merge.git] / extensions / browser / component_extension_resource_manager.h
blob6495f10d32f1c71f4d674ded957bc5122e77f3d2
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_BROWSER_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_
6 #define EXTENSIONS_BROWSER_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_
8 namespace base {
9 class FilePath;
12 namespace extensions {
14 // This class manages which extension resources actually come from
15 // the resource bundle.
16 class ComponentExtensionResourceManager {
17 public:
18 virtual ~ComponentExtensionResourceManager() {}
20 // Checks whether image is a component extension resource. Returns false
21 // if a given |resource| does not have a corresponding image in bundled
22 // resources. Otherwise fills |resource_id|. This doesn't check if the
23 // extension the resource is in is actually a component extension.
24 virtual bool IsComponentExtensionResource(
25 const base::FilePath& extension_path,
26 const base::FilePath& resource_path,
27 int* resource_id) const = 0;
30 } // namespace extensions
32 #endif // EXTENSIONS_BROWSER_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_